Z
zacks
Using VS 2005.
I have an app that has a DataGridView control. This control has two
columns, the first column is a standard TextBox, and the second column
is a CheckBox.
I am having difficulty determining the state of the CheckBox, whether
it is checked or not. I have identified an event that fires when the
user clicks in the checkbox, CellClick. In that event handler I
declare a local variable of the DataGridViewCheckBoxCell type and set
it to the cell that fired the event with a statement like this:
DataGridViewCheckBoxCell chk;
if (e.ColumnIndex == 1)
chk = datagridview.Rows[e.RowIndex].Cells[e.ColumnIndex];
But the chk.Value property is ALWAYS set whether the checkbox is
checked or not!!!
I have searched the help files but cannot find anything on how to
handle ANY of the DataGridView special cell types. How do I determine
the state of this checkbox cell?
TIA,
I have an app that has a DataGridView control. This control has two
columns, the first column is a standard TextBox, and the second column
is a CheckBox.
I am having difficulty determining the state of the CheckBox, whether
it is checked or not. I have identified an event that fires when the
user clicks in the checkbox, CellClick. In that event handler I
declare a local variable of the DataGridViewCheckBoxCell type and set
it to the cell that fired the event with a statement like this:
DataGridViewCheckBoxCell chk;
if (e.ColumnIndex == 1)
chk = datagridview.Rows[e.RowIndex].Cells[e.ColumnIndex];
But the chk.Value property is ALWAYS set whether the checkbox is
checked or not!!!
I have searched the help files but cannot find anything on how to
handle ANY of the DataGridView special cell types. How do I determine
the state of this checkbox cell?
TIA,