Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[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
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Binding to Data
   [Collapse]Data Shaping
    [Expand]Summarization
     Grouping
    [Expand]Sorting
    [Expand]Filtering
    [Collapse]Editing
      Cell Editors Overview
      Assigning Editors to Data Field's Cells
      Assigning Editors to Individual Cells
      Assigning Editors for In-place Editing
      Preventing Editors from Being Activated
     Data Formatting
   [Expand]Data Analysis
   [Expand]Layout
   [Expand]Focus and Navigation
   [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]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]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Preventing Editors from Being Activated

You can provide in-place editors for cells, as described in the Cell Editors Overview. In-place editors specify how cell values are represented on screen (in display mode). These editors also allow you to edit data. It's possible to disable the data editing and use in-place editors to represent cell values in read-only mode. To disable the data editing, you can use:

  • the PivotGrid control's PivotGridOptionsCustomizationEx.AllowEdit property.

    This allows you to disable data editing for all cells.

  • a data field's PivotGridFieldOptionsEx.AllowEdit property.

    This allows data editing to be disabled for cells corresponding to a specific data field.

  • the PivotGridControl.ShowingEditor event.

    This event allows you to disable data editing for particular cells. It fires when an in-place editor is about to be invoked. Setting the event's Cancel parameter to true prevents the editor from being invoked. The event's other parameters allow you to identify the currently processed cell, and determine when data editing should be disabled.

Expanded Example

The following code shows how to disable data editing for total cells. This is accomplished by handling the PivotGridControl.ShowingEditor event. When handling this event, the type of the current cell can be identified via the PivotCellEventArgsBase<TField, TData, TCustomTotal>.ColumnValueType and PivotCellEventArgsBase<TField, TData, TCustomTotal>.RowValueType parameters.

How would you rate this topic?​​​​​​​