How to get CheckBox Control from Datagridview in Windows form...?
C#
2
Posts
2
Posters
0
Views
1
Watching
-
I m using DataGridView. It has a checkbox column, i want to check - uncheck this CheckBox control.. In asp.net FindControls() is used to get control, is there any methon like FindControls() for Windows ?
-
I m using DataGridView. It has a checkbox column, i want to check - uncheck this CheckBox control.. In asp.net FindControls() is used to get control, is there any methon like FindControls() for Windows ?
To set the value of a CheckBoxCell you need to cast it specifically like this:
(dataRow.Cells["your cell index"] as DataGridViewCheckBoxCell).Value = true;
This presumes dataRow is your current datagridview row. Hope this helps
...and I have extensive experience writing computer code, including OIC, BTW, BRB, IMHO, LMAO, ROFL, TTYL.....