RSS Forums RSS
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting

counting checkboxes

Join Date: Dec 2004
Posts: 1,592
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 35
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: counting checkboxes

  #2  
Sep 20th, 2005
Coudn't you just add a counter to your logic?

int myCounter = 0;
foreach (DataGridItem spriden_ID in dgEmployees.Items)
{
  CheckBox cbSpriden = (CheckBox) spriden_ID.FindControl("cbSpriden");
  if (cbSpriden.Checked)
  {
    //Stuff to add to db here
    myCounter++;
  }
  else
  {
    lblStatus.Text ="Scheduling failed: " + addCourses.ErrorMessage;
  }
}
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 6:07 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC