hi all ,
Need to restrict row selection or cell selection ..ie the row shud not be highlighted any help ..plz
Thanks in advance
If SelectTypeRow is set to none, then you cannot select a row in the grid.
So one of two things must be happening:
1) SelectTypeRow is not set correctly. Maybe you are setting it and it's getting re-set somewhere else? Perhaps you are loading a layout which is over writing the setting you are applying in code.
2) The row is not selected and it's just highlighted for some other reason. Maybe it's the ActiveRowAppearance highlighting it.
Hi,
I set all the properties: SelectTypeRow, SelectTypeCell, and SelectTypeCol to None in the Override but I'm still able to select row in my grid at runtime.
Any idea?
Thanks!
You can turn off selection using the SelectTypeRow, SelectTypeCell, and SelectTypeCol properties on the Override.
The ActiveRow and ActiveCell in the grid will appear highlighted by default, so you can turn this off by going to grid.Displaylayout.Override and resetting the ActiveRowAppearance and ActiveCellAppearance.
I accomplished this in my InitializeLayout event by setting the CellActivation to NoEdit for each cell
int intCntr; for (intCntr = 0; intCntr < e.Layout.Bands[0].Columns.Count; intCntr++){ e.Layout.Bands[0].Columns[intCntr].CellActivation = Activation.NoEdit;}