ComponentOne True DBGrid Pro 8
MultiSelect Property

Sets or returns the type of selection allowed in the grid.

Syntax

TDBGrid.MultiSelect = value

Values

Design Time

Run Time

0 - None

dbgMultiSelectNone

1 - Simple (default)

dbgMultiSelectSimple

2 - Extended

dbgMultiSelectExtended

Remarks

Read/Write at run time and design time.

This property controls record selection behavior when the AllowRowSelect property is True. If AllowRowSelect is False, the user cannot select records.

If set to 0 - 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 the SelBookmarks collection. The Ctrl and Shift keys are ignored, and the user can only select one row at a time. However, you can still select multiple rows in code using the Add method of the SelBookmarks collection.

If set to 1 - Simple (the default), 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 the SelBookmarks collection. 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 2 - Extended, 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 + PgUp, and Shift + PgDn. Note:  When 2 - Extended is chosen, the user will not be able to select a single cell, instead the entire corresponding row will be selected.

See Also

TDBGrid Control

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback