This sample illustrates the different selection modes for grid cells. A specific selection behavior can be enabled by using the AllowSelection property of grid.
Features
The different types of selection modes are as follows:
GridSelectionFlags.AlphaBlend- In this mode, selected cells are highlighted by using alpha blending technique.
GridSelectionFlags.Any- This is the default mode for selecting cells, rows, columns, tables, multiple extending SHIFT key support, and alpha blending
GridSelectionFlags.Column- This mode enables column selection in the grid.
GridSelectionFlags.Row- This mode enables row selection in the grid.
GridSelectionFlags.Keyboard- This mode extends an existing selection when the user holds down the SHIFT key and uses the Arrow keys
GridSelectionFlags.MixRangeType- This mode provides support to select both rows and columns at the same time. Note that GridSelectionFlags.Multiple mode must be enabled for this to take effect.
GridSelectionFlags.Table- In this mode, the whole table can be selected.
GridSelectionFlags.Multiple- In this mode, multiple ranges of cells can be selected by using the CTRL key.
GridSelectionFlags.Shift- This mode extends an existing selection by using the SHIFT key.
GridSelectionFlags.None- This mode disables cell selection in the grid.