[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]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
   [Expand]Focus and Navigation
   [Expand]Selection
   [Expand]Drag-and-Drop
   [Expand]Conditional Formatting
   [Expand]Appearance Customization
   [Expand]MVVM Enhancements
   [Expand]Printing and Exporting
   [Expand]End-User Interaction
   [Expand]Miscellaneous
   [Collapse]Performance Improvement
     Optimized Mode
     Server Side Data Processing
     Parallelizing Data-Intensive Operations
     Performing Multiple Data Updates
     Improving the Scrolling Experience
     Frequent Update Performance Enhancement
   [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)

Optimized Mode

The GridControl uses lightweight templates to render its UI elements in optimized mode. This mode improves scrolling performance and reduces subsequent load times after loading the first instance.

Expanded In-place Editing

The GridControl's cell displays an in-placed data editor in edit mode when an end user edits a cell. Otherwise, the GridControl's cell displays its value in one of the following ways:

  • using the in-place editor in display mode
  • using the lightweight DevExpress.Xpf.Editors.InplaceBaseEdit editor (without a default visual tree). This approach is used in optimized mode.

The following editors support the optimized mode.

Optimized in-place editors in cell templates

Place a DevExpress.Xpf.Editors.InplaceBaseEdit editor with the x:Name property set to "PART_Editor" inside the cell template to use an optimized cell editor in a custom cell template. The column's ColumnBase.EditSettings property value provides the editor's settings.

The code sample below demonstrates a GridControl that uses a custom cell template to render its Id column cells. When an end-user edits this column's values, the SpinEdit control is used to edit column’s values. In display mode, the cell values are rendered using the optimized editor.

Applying styles to optimized editors

The Optimized mode does not support implicit editor styles. You can apply implicit styles in the following ways:

  • Apply an implicit style to the DevExpress.Xpf.Editors.InplaceBaseEdit that is rendered instead of an actual editor.

  • Use the DataViewBase.CellTemplate (see the Optimized in-place editors in cell templates section above) to create the required editor, and use the DevExpress.Xpf.Editors.InplaceBaseEdit's EditCoreStyle property to specify its custom style in edit mode.

Note

In optimized mode, the DataViewBase.ShowEditor method sets the DataViewBase.ActiveEditor property value asynchronously. To access the active editor, use the GridViewBase.ShownEditor's EditorEventArgs.Editor property. In TreeListView, use the TreeListView.ShownEditor's TreeListEditorEventArgs.Editor property to access the active editor.

Expanded Row and Cell Resources

When the GridControl functions in optimized mode, it uses a special lightweight visual elements and templates. Certain custom styles and resources can only be used in optimized mode. Below is a table with both modes' corresponding elements.

Unoptimized Mode

Optimized Mode

DevExpress.Xpf.Grid.GridRow

DevExpress.Xpf.Grid.GridRowContent

DevExpress.Xpf.Grid.RowControl

DevExpress.Xpf.Grid.RowIndicatorControl

DevExpress.Xpf.Grid.RowIndicator

DevExpress.Xpf.Grid.DetailRowsIndentControl

-

DevExpress.Xpf.Grid.RowOffsetPresenter

-

DevExpress.Xpf.Grid.GridCellContentPresenter

DevExpress.Xpf.Grid.LightweightCellEditor

DevExpress.Xpf.Grid.GroupRowContentPresenter

DevExpress.Xpf.Grid.GroupRowControl

You should change the following target types to use the Optimized mode:

For the TableView.RowStyle style, set the target type to DevExpress.Xpf.Grid.RowControl.

For DataViewBase.CellStyle style, set the target type to DevExpress.Xpf.Grid.LightweightCellEditor.

The base style is as follows.

Note

When the view's cell or row styles and templates are specified before setting the TableView.UseLightweightTemplates value, an exception occurs. You can avoid exceptions using any of the following workarounds:

Expanded Limitations

Expanded Examples

Expanded See Also

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