Sundaram Subramanian

Sundaram Subramanian

  • 72
  • 26.2k
  • 1.4m

Count Unchecked Checkbox in Gridview

May 11 2017 1:17 AM
I need to count No.of unchecked Checkbox in a gridview using Linq. Here I have pasted the count for Checked one. I need Count of Unchecked 
 
int totalCount = GridView1.Rows.Cast<GridViewRow>() .Count(r => ((CheckBox)r.FindControl("chkSelect")).Checked); // maybe: if(totalCount > 0) UpdateProduct(totalCount);
 

Answers (1)