Gets or sets the selection state of the grid.
[Visual Basic]
Public Property MultiSelect As MultiSelectEnum
[C#]
public MultiSelectEnum MultiSelect {get;set;}
[Delphi]
public property MultiSelect: MultiSelectEnum read get_MultiSelect write set_MultiSelect;
Remarks
If set to MultiSelectEnum.None, multiple selection is disabled but single selection is permitted. When the user clicks a record selector, the current selection is cleared, and the clicked row is then selected and added to either the SelectedRowCollection or SelectedColumnCollection collections. The CTRL and SHIFT keys are ignored, and the user can only select one row at a time.
If set to MultiSelectEnum.Simple, multiple selection is enabled using the mouse. When the user clicks a record selector, the selection is cleared and the clicked row is selected and added to either the SelectedRowCollection or SelectedColumnCollection collections. However, if the user holds down the CTRL key while clicking, the clicked row is added to the current selection. The user can also select a range of rows by selecting the first row in the range, then selecting the last row in the range while holding down the SHIFT key.
If set to MultiSelectEnum.Extended (the default), multiple selection is enabled using the mouse as described in the previous paragraph. The user can also select records with the following key combinations: SHIFT + UP ARROW, SHIFT + DOWN ARROW, SHIFT + PAGE UP, and SHIFT + PAGE DOWN.
Note: When MultiSelectEnum.Extended is chosen, the user will not be able to select a single cell, instead the entire corresponding row will be selected.
Example
The following example programmatically assigns the MultiSelectEnum.Extended value of the MultiSelect property to the grid:
Me.C1TrueDBGrid1.MultiSelect = C1.Win.C1TrueDBGrid.MultiSelectEnum.Extended
· C#
this.c1TrueDBGrid1.MultiSelect = C1.Win.C1TrueDBGrid.MultiSelectEnum.Extended;
· Delphi
Self.C1TrueDBGrid1.MultiSelect := C1.Win.C1TrueDBGrid.MultiSelectEnum.Extended;
See Also
C1TrueDBGrid Class | C1TrueDBGrid Members | C1.Win.C1TrueDBGrid Namespace
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |