selection
A user can select rows in a single or multiple mode. In multiple mode, a user can select all rows at once. To disable this feature, assign false to the allowSelectAll.
By default, once a user selects a row, the data source is instantly notified about it. This may lower the widget performance if the data source is remote and the user is allowed to select all rows at once. In this case, we recommend making the selection deferred.
See Also
allowSelectAll
If this option is set to true, it allows a user to select all rows at once by pressing Ctrl + A or clicking the check box in the selection column's header. The "Select All" check box also allows a user to deselect all rows. The select all functionality allows selecting/deselecting only those rows that meet filtering conditions if a filter is applied.
If this option is set to false, it disables the select all functionality. In this case, the check box clears selection and is hidden if no rows are selected.
deferred
Consider making selection deferred if the widget needs to operate a large volume of data and the user is allowed to select all rows at once. Unlike usual (or "instant") selection, in the case of deferred selection, the widget requests data only when you demand this using the API, for example, when the getSelectedRowsData() or getSelectedRowKeys() method is called. This mode has certain specifics that determine the API you need to use. For more information, see the Deferred Selection article.
mode
The following selection modes are available in the widget:
Single
Only one row can be in the selected state at a time.Multiple
Several rows can be in the selected state at a time.
When using the widget as an ASP.NET MVC Control, specify this option using the SelectionMode
enum. This enum accepts the following values: None
, Single
and Multiple
.
selectAllMode
Specifies the mode in which all the records are selected. Applies only if selection.allowSelectAll is true.
selectAllMode specifies how records should be selected on clicking the "Select All" check box and by calling the selectAll()/deselectAll() methods. The following modes are available.
'page'
Selects records on currently rendered pages.NOTEThis mode is incompatible with deferred selection.'allPages'
Selects records on all pages.
When using the widget as an ASP.NET MVC Control, specify this option using the SelectAllMode
enum. This enum accepts the following values: Page
and AllPages
.
See Also
showCheckBoxesMode
Specifies when to display check boxes in rows. Applies only if selection.mode is "multiple".
The selection behavior in multiple mode depends on the check boxes' visibility. Selection is proper multiple only when check boxes are visible. In other cases, the selection behavior resembles the single mode: clicking (or tapping) a row selects it, but cancels the selection of other rows. However, a user still can select multiple rows in this mode using a click and hold, or long tap.
Check boxes can change their visibility state at runtime. The following list describes how they behave in different modes:
"onClick"
Check boxes appear once a user clicks anywhere in the selection column, or if two or more rows are selected programmatically or using keyboard shortcuts. Check boxes disappear once rows selection is canceled."onLongTap"
The selection column with all check boxes (dis)appears on long tap, or click and hold."always"
The selection column with all check boxes is always visible, which means that selection is never single-like in this mode. Clicking rows has no effect."none"
Check boxes are always hidden, which means that selection is always single-like in this mode.
Keyboard shortcuts work identically regardless of the chosen mode.
When using the widget as an ASP.NET MVC Control, specify this option using the GridSelectionShowCheckBoxesMode
enum. This enum accepts the following values: OnClick
, OnLongTap
, Always
and None
.
See Also
If you have technical questions, please create a support ticket in the DevExpress Support Center.
We appreciate your feedback.