[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
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Implementation Details
   [Expand]Grid View Data Layout
   [Expand]Binding to Data
   [Expand]Master-Detail Data Representation
   [Expand]Data Editing and Validation
   [Expand]Filtering and Searching
   [Expand]Data Summaries
   [Expand]Paging and Scrolling
   [Collapse]Focus, Navigation, Selection
     Multiple Row Selection
     Multiple Cell Selection
     Obtaining Selected Rows and Cells
     Selection Rectangle
   [Expand]Conditional Formatting
   [Expand]Appearance Customization
   [Expand]MVVM Enhancements
   [Expand]Printing and Exporting
   [Expand]Performance Improvement
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]End-User Capabilities
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [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
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[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 Cell Selection

In this mode, an end-user can select contiguous blocks of cells and individual cells within different data rows by clicking them, while holding the SHIFT or CTRL key down. It is enabled if the DataControlBase.SelectionMode property is set to MultiSelectMode.Cell and the DataViewBase.NavigationStyle property is set to GridViewNavigationStyle.Cell.

The methods which can be used to select/unselect cells:

Method Description
TableView.SelectCell Selects the specified cell.
TableView.SelectCells Selects multiple cells.
TableView.UnselectCell Unselects the specified cell.
TableView.UnselectCells Unselects multiple cells.

For information on how to obtain selected cells, see Obtaining Selected Rows and Cells.

Expanded Selection Availability

You can dynamically control selection availability and prevent end-users from selecting or unselecting particular cells.

Handle the TableView.CanSelectCell (TreeListView.CanSelectCell) or TableView.CanUnselectCell (TreeListView.CanUnselectCell) event to dynamically allow or prevent any cell selection.

Expanded Example: How to Change the Appearance of Selected Cells

You should implement your own CellStyle. In this CellStyle, implement style triggers for the SelectionState property. Four values can be assigned to this property: None, Focused, Selected, FocusedAndSelected.

Expanded Highlight Cells On Hover

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

Expanded Limitations

Bands do not support multiple cell selection.

Expanded See Also

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