Does this help if you change the values for your grid and tables? I have this
code in the cell changed event
foreach (DataRow myDataRow in fixed1DataSet.Tables["Commands"].Rows)
{
s1Command = (myDataRow["CommandName"].ToString());
userUsed = (myDataRow["UseCode"].ToString()); //
get if user code is used for this comand
if (userUsed == "False")
{
scriptDataGridView[5,
e.RowIndex].ReadOnly = true; // disable user code cell
}
else
scriptDataGridView[5,
e.RowIndex].ReadOnly = false; // enable user code cell
}
}
"Diogo Alves - Software Developer" wrote:
greetings,
I have a datagrid view filled with some data, in that data some of the cells
are null and I would like to not let the user select the rows with null
values...
the problem is that the selection goes there when I click and then jump back
to last selected row... the correct behaviour would be stay on the last
selected row always until the user select a new valid row...
I desperate trying to solve this for weeks... please somebody give me a
hint...
Thanks in advance