HA
haneefm
Syncfusion Team
July 9, 2007 04:04 PM UTC
Hi Rahul,
To prevent a row from being selected, you can handle the gridDataBoundGrid1.Model.SelectionChanging or gridControl1.SelectionChanging event, and if the cell is contained in the invalid value, then cancel the selection through e.Cancel property. Below is a code snippet
this.gridDataBoundGrid1.ListBoxSelectionMode = SelectionMode.One;
void Model_SelectionChanging(object sender, GridSelectionChangingEventArgs e)
{
int iRowIndex = e.ClickRange.Top;
GridModel _model = sender as GridModel;
if (_model[iRowIndex, 1].Text == "7")
e.Cancel = true;
}
Best regards,
Haneef