I need a way to keep the grayed cells (see attached sample) from being selected. I have some code commented out in the selection changing event that almost works but I want the first 32 cells in column 1 & column 2 to be selected when the user clicks the column header. If possible I would like to be able to use the mouse or arrow keys and select all the cells except the grayed ones.
Please note I''m using an, Essential Grid version 220.127.116.11, GridControl with Visual Basic.Net not a DataBoundGrid with C code. Please note the difference when sending me samples.
ADAdministrator Syncfusion Team May 27, 2004 02:22 PM
Try this code.
Private Sub grdCreditPDS_SelectionChanging(ByVal sender As System.Object, ByVal e As GridSelectionChangingEventArgs)
If (e.Range.Contains(GridRangeInfo.Col(1)) Or e.Range.Contains(GridRangeInfo.Col(2))) Then
e.Range = GridRangeInfo.Cells(1, e.Range.Left, 32, e.Range.Right)
If (e.Range.IntersectsWith(GridRangeInfo.Cells(33, 1, 128, 2))) Then
e.Cancel = True