Ok I have a GridView on my form. The GridView datasource is a DataTable.
the datatable columns types are: bool (checkbox), text, text, text.
I set all the grid columns to read only except for the first one, to allow the user to check/uncheck to box.
I also have a timer that ticks every 7 seconds and refreshes the datatable.
Everything works fine to this point.
Within the tick event i save the selected row, and then select it again after the data refresh, so the highlighted row doesn't pop back up to the top.
The problem is, when it does this, column[0] (the check box column) becomes readonly.
if i comment out the "gridview.CurrentRow = gvMassTickets.Rows[selectedrow];"
it works just fine.
the datatable columns types are: bool (checkbox), text, text, text.
I set all the grid columns to read only except for the first one, to allow the user to check/uncheck to box.
I also have a timer that ticks every 7 seconds and refreshes the datatable.
Everything works fine to this point.
Within the tick event i save the selected row, and then select it again after the data refresh, so the highlighted row doesn't pop back up to the top.
private
void
tTickets_Tick(
object
sender, EventArgs e)
{
int
selectedrow = gridview.CurrentCell.RowIndex;
GetData();
gridview.CurrentRow = gvMassTickets.Rows[selectedrow];
}
The problem is, when it does this, column[0] (the check box column) becomes readonly.
if i comment out the "gridview.CurrentRow = gvMassTickets.Rows[selectedrow];"
it works just fine.