Is there a way to set a row in a state that it can''t be selected in the GDBG?
I have some DataRows in the datasource which have a logical state and they should not be selectable in the grid. By default, the ListBoxSelectionMode is set to One, it should also work when it is set to MultiExtended.
Which events have to be used to achive this?
1. the row cannot be selected, also when MultiExtended is set
2. The row is visual marked(PrepareViewStyleInfo(?) to changing text color)
ADAdministrator Syncfusion Team June 7, 2004 12:41 PM
To avoid a row, say someRowIndex, being included in a selection, you can handle the grid.Model.SelectionsChanging event. If e.Range.IntersectsWith(GridRangeInfo.Row(someRowIndex)), then you can set e.Cancel to prevent the selection. To color such a row, you would use grid.PrepareViewStyleInfo, setting e.Style.BackColor if e.RowIndex equals someRowIndex.