[Expand]General Information
[Collapse]WinForms Controls
 [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
  [Collapse]Vertical Grid
   [Expand]Binding to Data
   [Collapse]Data Layout: Records, Rows and Cells
      Adding and Deleting Records
      Focusing and Scrolling Records
    [Expand]Customization Form
     Data Layout: Records, Rows, and Cells
   [Expand]Data Editing and Validation
    Formatting Values
   [Expand]Drag and Drop
   [Expand]Appearance and Custom Painting
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]End-User Capabilities
    Hit Information
    Batch Modifications
   [Expand]Member Tables
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Member Tables
  [Expand]Tree List
  [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 (Learn more)


The Vertical Grid Control (VGridControl) arranges data into Rows and records. The rows correspond to the fields of an underlying dataset and are arranged horizontally. The records correspond to the dataset's records and are comprised of data cells arranged one under another.

The Property Grid Control (PropertyGridControl) doesn't support multiple records. It always display a single record (value column), which displays values of a bound object's properties. So the information covered in this document and other documents related to records concerns the VGridControl component, not the PropertyGridControl.

The current topic lists the differences in record presentation when various Layouts are applied to the VGridControl control and gives information on customizing its appearances.

Expanded Records, Layouts and Data Modes

The VGridControl control can use three different layouts to display data. When the Multiple Records View Layout or Single Record View Layout is applied to the control, records are represented as "columns" displayed in front of the row header panel. The only difference between these two layouts is that the multiple records view layout displays several records simultaneously, while the single records view layout displays a single record at a time. The image below illustrates record arrangement when the two mentioned layouts are applied to the control.

When the Bands View Layout is applied to the control a single record is displayed at a time. Also, the control cannot be scrolled vertically when this layout type is used. If there are too many rows to fit into the control vertically, the displayed record (together with the corresponding row headers) is arranged into a number of bands. The image below shows an example of such an arrangement.

If the grid uses an external data store, each record in the control is associated with a record from the underlying dataset. In bound mode, you may face additional tasks of adding and deleting records and moving focus between them. The Adding and Deleting Records and Focusing and Scrolling Records topics contain all the information you will need to perform these tasks.

When the grid control works in Unbound Mode, there is a single record maintained by the control. This record's data is stored internally - one value per each row item. Thus, the tasks of adding and deleting records or moving record focus are not applicable to this mode. The best layouts to apply when this mode is used are the single record view layout and the bands view layout.

Expanded Customizing the Appearance of Records

One way to customize the appearance of records implies changing their width and the interval between them. Note that these settings are applied to the whole control - you cannot change the width of an individual record or the interval between just two records. To modify the settings you should use the VGridControlBase.RecordWidth and VGridControlBase.RecordsInterval properties of the control, respectively. The image below illustrates the effect of these properties.

Another aspect of record appearance that can be customized is the style of data cells. Two ways can be used to implement this:

  • Using the Appearance settings. This technology gives you the ability to change the appearance object applied to all data cells within the control, the appearance settings of cells residing within the currently focused row and the focused cell's appearance. This can be performed by customizing the RecordValue, FocusedRecord and FocusedCell properties respectively. The image below shows how changes to these styles affect the control's appearance.

    Please refer to the Appearances topic for details on customizing the appearance settings.

  • Customizing appearances of individual cells. This can be performed by handling either the VGridControlBase.RecordCellStyle or the VGridControlBase.CustomDrawRowValueCell event. Both events fire for individual cells before these cells are painted. The first enables you to change the appearance of the processed cell. The second gives you the ability to paint cells in a custom manner. You can use these events to implement conditional formatting of records - cells residing within records satisfying a particular condition will have a different appearance. Please refer to the Customizing Appearances of Individual Cells and Custom Painting topics for details on implementing this.

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