[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [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
  [Collapse]Data Grid
   [Expand]Get Started With Data Grid and Views
   [Expand]Data Binding
    Unbound Columns
   [Expand]Data Editing and Validation
   [Expand]Filter and Search
   [Expand]Focus and Selection Handling
    Format Cell Values
   [Expand]Master-Detail Relationships
   [Expand]Asynchronous Image Load
   [Expand]Export and Printing
   [Expand]Appearance and Conditional Formatting
    Split Presentation
    Row Preview Sections
   [Expand]Batch Modifications
    Hit Information
    Popup Menus
   [Expand]Save and Restore Layout
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]End-User Capabilities
    Included Components
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [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]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

Row Preview Sections

Preview sections are additional non-editable rows, displayed for every Data Grid's regular data row. These sections allow you to display large content that does not fit in columns.

Expanded Enable Preview Sections

To enable preview sections, set the GridOptionsView.ShowPreview property to true and assign a data field to the GridView.PreviewFieldName property.

Demo: Auto Preview

Expanded Text Offset

Utilize the GridView.PreviewIndent property to set the left offset for text in preview sections.

Expanded Fixed Preview Height Versus Auto Height

To limit preview sections' height or allow these sections to dynamically adjust themselves according to content, utilize the GridView.PreviewLineCount and GridOptionsView.AutoCalcPreviewLineCount properties.

Expanded Custom Height

Handle the GridView.MeasurePreviewHeight event to set individual heights for specific preview sections. Event arguments provide two properties:

Expanded Custom Preview Content

To display custom text content or values from multiple data fields at once, handle the GridView.CalcPreviewText event and set the CalcPreviewTextEventArgs.PreviewText property in the event arguments. You can also handle the GridView.CustomDrawRowPreview event to paint images in preview sections.

The code below makes preview sections display strings combined from values of three data source fields: "MPG City", "MPG Highway" and "Description". The GridView.CustomDrawRowPreview event is handled to draw images from the "Image" data source field.

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