1
Answer

Count Unchecked Checkbox in Gridview

Sundar

Sundar

7y
290
1
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)