CheckBoxCell in DataGridView.
-
Hi everyOne. I have a DataGridView with a checkBoxCell(Column).I have 30 or...Rows in my dataGridView and i check 20 rows. I want to know how many rows is checked. And how many is Not. Thank u.
CanI
-
Hi everyOne. I have a DataGridView with a checkBoxCell(Column).I have 30 or...Rows in my dataGridView and i check 20 rows. I want to know how many rows is checked. And how many is Not. Thank u.
CanI
According to my calculations you have 20 checked, which leaves 10 unchecked. Hope this helps! :)
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
Hi everyOne. I have a DataGridView with a checkBoxCell(Column).I have 30 or...Rows in my dataGridView and i check 20 rows. I want to know how many rows is checked. And how many is Not. Thank u.
CanI
Something like the following should suffice:
int checkedCount = 0; foreach (DataGridRow row in this.myDataGridView) { if (row.Cells\["nameOfYourColumn"\].Value == true) { checkedCount++; } }
Sorry about the previous post, I couldn't resist! :-D
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”