The Grid component supports selecting/deselecting rows programmatically or via the UI. It seamlessly integrates with paging, sorting, filtering, and grouping.
The following plugins implement selection features:
Note that plugin order is important.
DxTableSelection plugins to set up a simple Grid with selection enabled. Specify the selection using the
selection property and subscribe to the
update:selection event. Use the
.sync modifier for two-way binding.
A user can select a row using a checkbox click by default. Set the
selectByRowClick property to true to check/uncheck a checkbox by a row click as demonstrated in the following example:
In some scenarios, it is useful to highlight selected rows instead of using checkboxes. For this, hide checkboxes by setting the
showSelectionColumn property to false and assign true to the
highlightRow properties as demonstrated in the following demo:
Perform the following steps to enable the Select All capability:
DxIntegratedSelectionplugin above the
showSelectAllproperty to true.
The following example demonstrates selection without paging. You can increase the row count using the Table’s virtual mode.
If you are using the
DxIntegratedPaging plugin, you can integrate the Select All behavior with the
The Select All checkbox selects/deselects all rows on a page or all pages depending on the
DxIntegratedPaging plugin’s order.
DxIntegratedSelection plugin after
DxIntegratedPaging to implement the Select All behavior within a visible page:
DxIntegratedSelection plugin before
DxIntegratedPaging to select/deselect all rows on all pages: