1
Reply

Count Unchecked Checkbox in Gridview

Sundar

Sundar

May 11 2017 1:17 AM
260
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)