Skip to main content

Layouts Overview

  • 2 minutes to read

Layout is the manner in which the vertical grid control will provide data. The main distinction of the vertical grid control from other grid controls is how it displays records. All records are arranged vertically in the vertical grid. In other words every column in the vertical grid represents a data record.

The ExpressVerticalGrid control supports 3 layouts:

  • Bands View Layout - only one record is available at a time in the grid control. The record will be rearranged into bands to occupy all of the client area of the grid control if the height of the grid control is insufficient to display the record height entirely. This type of layout is useful if you want all of the record’s fields to be visible in the grid control.

  • Single Record View Layout - only one record is available at a time in the grid control. If the height of the record doesn’t fit the control’s height the record will be clipped. This type of layout is useful if a record has a few fields to display;

  • Multiple Records View Layout - more than one record is available at a time in the grid control. This type of layout can be used if a record is not too large and you want to speed up navigation through records.

Detailed description’s of every layout is provided in separate topics that are referred to from this document.

Setting the Layout

Setting the layout at design time or runtime.

To set the layout at design time use the Object Inspector as shown in the image below:

To set the layout at runtime use the TcxVirtualVerticalGrid.LayoutStyle property. The code below demonstrates 3 possible scenarios:

//...
cxDBVerticalGrid1.LayoutStyle := lsBandsView;
// or
cxDBVerticalGrid1.LayoutStyle := lsSingleRecordView;
// or
cxDBVerticalGrid1.LayoutStyle := lsMultiRecordView;