Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
  [Expand]Reporting
  [Expand]Chart Control
  [Collapse]Grid View
   [Expand]Product Information
    Getting Started
   [Expand]Fundamentals
   [Collapse]Concepts
    [Expand]Binding to Data
    [Collapse]Data Representation Basics
     [Expand]Cells
     [Expand]Columns
     [Collapse]Rows
       Traversing Rows
       Preview
     [Expand]Customization Window
     [Expand]Context Menu Overview
      Customization Dialog
    [Expand]Focus and Navigation
    [Expand]Data Editing
    [Expand]Data Shaping and Manipulation
    [Expand]Data Formatting
    [Expand]Master-Detail Relationship
     Appearance Customization
     Adaptivity
     Save and Restore Layout
    [Expand]Templates
     Export
     Toolbars
    [Expand]ASPxGridLookup
    ASPxGridView Designer
   [Expand]Visual Elements
   [Expand]Examples
   [Expand]Member Tables
   [Expand]ASPxGridView - Animated Images
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Site Navigation and Layout
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Expand]Scheduler
  [Expand]HTML Editor
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gauges
  [Expand]Data Editors
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[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

Preview

ASPxGridView provides a preview feature that allows each data row to display preview rows. Preview rows are non-editable rows that allow large memo fields or custom data to be displayed across all the columns within ASPxGridView.

Preview rows are displayed if the ASPxGridViewSettings.ShowPreview option is set to true. By default, these rows are empty. To supply data for them, specify the ASPxGridView.PreviewFieldName property. This property specifies the name of the data source field whose values are displayed within preview rows.

To get the text displayed within a specified preview row, use the ASPxGridView.GetPreviewText method.

The style settings used to paint preview rows can be accessed and customized via the GridViewStyles.PreviewRow property.

To create a custom layout for preview rows, create a template and assign it to the GridViewTemplates.PreviewRow property.

For more information on templates, see Templates.

Expanded Example: How to Display Images within Preview Rows

This example demonstrates how to display images within preview rows. To do this, customize ASPxGridView's PreviewRow template using the Template Designer.

To invoke the Template Designer, click the Edit Templates task, and then select the PreviewRow template. As a result, ASPxGridView is displayed in a template-editing mode.

Drag ASPxImage and ASPxLabel controls from the Toolbox, and drop them into the PreviewRow template. In this example, the ASPxImage control is used to display images. ASPxLabel is used to display the description.

Bind the ASPxImage control to a data field that contains image URLs.

The ASPxLabel control should be bound to a data field that contains the description information.

The image below illustrates the result.

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