I want to uncheck all selected CheckBoxes from DataGridView which is generated dynamically?
I tried like following
for (int i = 0; i < MygridView.Rows.Count; i++)
{
DataGridViewCheckBoxCell cell = (DataGridViewCheckBoxCell)MygridView.Rows[i].Cells[0];
if (cell.Value == cell.TrueValue)
{
// (row.Cells[CheckBoxColumn.Index] as DataGridViewCheckBoxCell).value = false;
Need to unchecked all checked checkboxes
}
}
Or Is there any other method?