[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Binding to Data
   [Expand]Data Shaping
   [Expand]Data Analysis
   [Expand]Layout
   [Collapse]Focus and Navigation
     Focusing Cells and Scrolling
     Selecting Data Cells
   [Expand]Printing and Exporting
   [Expand]Appearance
   [Expand]Design-time Features
   [Expand]Miscellaneous
   [Expand]UI Elements
   [Expand]End-User Capabilities
   [Expand]Examples
   [Expand]Member Tables
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[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)

Selecting Data Cells

Pivot Grid provides properties that allow data cells to be selected via code. Selected data can be copied to the Clipboard and pasted into other applications (e.g. MS Excel, MS Word).

The ability to select multiple data cells is determined by the PivotGridOptionsSelection.CellSelection option. These options can be accessed via the Pivot Grid Control's PivotGridControl.OptionsSelection property. When this option is enabled, multiple cells can be selected in the following ways.

  • using a mouse;
  • using key combinations;
  • via code.

End-users can select cells with a mouse or keyboard (see the Selecting Cells topic of the End-User Capabilities section).

The information on cells displayed by a Pivot Grid Control is returned by the PivotGridControl.Cells property. The returned object's PivotGridCells.Selection property returns a System.Drawing.Rectangle object that contains coordinates of selected cells. The Left and Right properties identify the leftmost and rightmost columns that contain selected cells. The topmost and bottommost rows that contain selected cells are identified by the Top and Bottom properties, respectively.

If the PivotGridOptionsSelection.MultiSelect option is enabled, an end-user can select multiple blocks of cells via a mouse with the Ctrl key pressed down.

To access Pivot Grid Control's multiple selection, use the PivotGridCells.MultiSelection property. The code below shows how to select cells in code.

 

Appearance settings used to paint selected cells are specified by the PivotGridAppearances.SelectedCell property.

After cell selection has been changed, the PivotGridControl.CellSelectionChanged event is raised.

Expanded See Also

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