Hello Sir
Thank You For your valuable information
its working from Your code.
Now another my proble in same senerio is i want to make a checked checkbox in
datagridview as uncheck based on some condition(ie if the user selects fist row and it is mandatatory that he has to select the next row which is same as first row if he not select that then ) i want to uncheck that using code.
i tryed by doing reverse engineering like making the isdirty proprtey true but it is thriuging an error its is read only
sample code
routenumber = "rrt";
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
if (dataGridView1.IsCurrentCellDirty)
DataGridViewDataErrorContexts.Commit);
if (Boolean.Parse(dataGridView1.Rows[0].Cells[1].Value.ToString()) == true)
MessageBox.Show(dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString());
DataGridViewDataErrorContexts.Commit);
You can use google to search for other answers