[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Implementation Details
   [Expand]Views
   [Expand]Grid View Data Layout
   [Expand]Binding to Data
   [Expand]Master-Detail Data Representation
   [Expand]Data Editing and Validation
   [Expand]Grouping
   [Expand]Filtering and Searching
   [Expand]Sorting
   [Expand]Data Summaries
   [Expand]Paging and Scrolling
   [Collapse]Focus, Navigation, Selection
     Focus
     Multiple Row Selection
     Multiple Cell Selection
     Obtaining Selected Rows and Cells
     Selection Rectangle
   [Expand]Drag-and-Drop
   [Expand]Conditional Formatting
   [Expand]Appearance Customization
   [Expand]MVVM Enhancements
   [Expand]Printing and Exporting
   [Expand]End-User Interaction
   [Expand]Miscellaneous
   [Expand]Performance Improvement
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]End-User Capabilities
   [Expand]Examples
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Multiple Row Selection

In this mode, multiple data and/or group rows can be selected at one time. In a CardView, you can select multiple cards. In a TreeListView, you can select multiple nodes. To enable this mode, set the DataControlBase.SelectionMode property to MultiSelectMode.Row or MultiSelectMode.MultipleRow. The DataViewBase.NavigationStyle property must be set to GridViewNavigationStyle.Cell or GridViewNavigationStyle.Row.

Expanded Selecting Records in UI

End users can select multiple rows using Shift or Ctrl keys. Enable the TableView.UseIndicatorForSelection/TreeListView.UseIndicatorForSelection option to allow an end user to select a range of rows/nodes/cells by dragging the mouse along the Row Indicator Panel.

Web-style Row Selection

You can enable the Web Style Row Selection. When this feature is enabled, a Selector Column can be used to select/deselect individual rows and groups. To activate this feature, set the view's TableView.ShowCheckBoxSelectorColumn property to true.

Note

Expanded Selecting Records in Code

The GridControl provides multiple members which allow you to select/unselect multiple rows/cards/nodes:

Member

Description

DataControlBase.SelectAll

DataControlBase.UnselectAll

Selects all rows/cards/nodes within a View.

Unselects any selected rows/cards/nodes within a View.

DataControlBase.SelectRange

Selects multiple rows/cards/nodes, while preserving the current selection (if any).

DataControlBase.SelectItem

DataControlBase.UnselectItem

Selects the specified row (or the treelist Node).

Unselects the specified row (or the treelist Node).

DataControlBase.SelectedItems

DataControlBase.SelectedItem

DataControlBase.CurrentItem

Gets or sets data objects that correspond to rows (or nodes in TreeListView) currently selected within a View.

Gets or sets the currently focused Data Row (if row multi-selection is disabled); or the first selected row (if row multi-selection is enabled).

Gets or sets the currently focused Data Row.

Expanded Selection Availability

You can dynamically control selection availability and prevent end-users from selecting or unselecting rows/nodes/cards.

Handle the DataViewBase.CanSelectRow or DataViewBase.CanUnselectRow event to dynamically allow or prevent any row/node/card selection.

Expanded Appearance Customization

Set the DataViewBase.EnableSelectedRowAppearance property to false, to disable the specific decoration of selected rows.

The image below demonstrates the visual difference between two controls with the disabled and enabled DataViewBase.EnableSelectedRowAppearance option. The first four rows are selected in both the grids.

Expanded Example: How To Select Rows That Contain The Specified Value

This example shows how to select rows whose UnitPrice column contains a value equal to or greater than 20. To select rows, click the Select button.

Expanded Highlight Rows On Hover

Set the TableView.HighlightItemOnHover/TreeListView.HighlightItemOnHover property to true to enable highlighting rows when hovering:

Expanded See Also

Is this topic helpful?​​​​​​​