P
PaulNaude
I have a datagrid with boolean columns and as a test I display the value of
the checkbox in a label (not bound) as the user clicks in the grid cell.
Depending on the value of the checkbox as set by the user, my code should go
different routes.
My problem is that the value of that particular cell stays the same
regardless of its visible appearance. Only when the user re-enters the cell
after selecting a different row, does the value reflect the actual visibly
set value. The value then changes again but referencing it as set out below
shows the value when the user entered the cell.
In the datagrid's click event I used:
Label1.Text +=
DataSet71.Tables("MyTable").DefaultView.Item(DataGrid1.CurrentRowIndex).Item(1).ToString
and also
Label1.Text += DataGrid1.Item(DataGrid1.CurrentRowIndex, 1).ToString()
For each click the above event is fired and add to the label's text, but the
grid cell's value do not change, eventhough the checkbox visibly changes its
value. The true value is only displayed (in the label) on re-entering the
cell.
I need my code to run on the click event of the datagrid and the value of
the checkbox should determine what should happen.
How can I get the actual value (as displayed by the checkbox)?
the checkbox in a label (not bound) as the user clicks in the grid cell.
Depending on the value of the checkbox as set by the user, my code should go
different routes.
My problem is that the value of that particular cell stays the same
regardless of its visible appearance. Only when the user re-enters the cell
after selecting a different row, does the value reflect the actual visibly
set value. The value then changes again but referencing it as set out below
shows the value when the user entered the cell.
In the datagrid's click event I used:
Label1.Text +=
DataSet71.Tables("MyTable").DefaultView.Item(DataGrid1.CurrentRowIndex).Item(1).ToString
and also
Label1.Text += DataGrid1.Item(DataGrid1.CurrentRowIndex, 1).ToString()
For each click the above event is fired and add to the label's text, but the
grid cell's value do not change, eventhough the checkbox visibly changes its
value. The true value is only displayed (in the label) on re-entering the
cell.
I need my code to run on the click event of the datagrid and the value of
the checkbox should determine what should happen.
How can I get the actual value (as displayed by the checkbox)?