Back to Devexpress

Layouts

windowsforms-2463-controls-and-libraries-vertical-grid-layouts.md

latest4.4 KB
Original Source

Layouts

  • Aug 18, 2022
  • 4 minutes to read

The Vertical Grid Control (VGridControl) allows you to represent underlying data using different formats - layouts. Layouts differ in the number of records they display at a time and in the way they are arranged. This topic demonstrates how to change a layout and briefly explains the differences between each layout. Each layout is described in detail in its own separate topic (links are provided).

The PropertyGridControl supports only one layout, which is equivalent to the Single Record View Layout used in the Vertical Grid Control. The Property Grid Control does not support horizontal scrolling.

How to Change the Layout

The layout currently applied to a VGridControl control is specified by its VGridControl.LayoutStyle property. The image below demonstrates how the layout can be changed at design time.

The same can also be done in code:

csharp
vGridControl1.LayoutStyle = DevExpress.XtraVerticalGrid.LayoutViewStyle.SingleRecordView;
vb
vGridControl1.LayoutStyle = DevExpress.XtraVerticalGrid.LayoutViewStyle.SingleRecordView

As can be seen from the above image there are three different layout styles which can be applied to a vertical grid control. These layout styles are listed below:

Scrolling through Records in Different Layouts

Basically, there are three ways in which end-users can navigate through records: using the left and right arrow keys, the mouse wheel or the horizontal scrollbar. However, not all of these navigation methods are supported by each type of layout. The list below describes the methods that are available for scrolling through the records in each layout and explains how they can be enabled or disabled, as well as providing information on how each navigation method works with each particular layout style.

  • Moving focus from record to record using the left and right arrow keys. The table below shows how this type of navigation depends upon the layout applied.
Layout StyleDescription
Bands View LayoutKey navigation through the records is disabled. Left and right arrow keys are used to navigate through the bands in this case.
Single Record View LayoutKey navigation is enabled only when the horizontal scrollbar is displayed.
Multiple Records View LayoutKey navigation through the records is always enabled.

Note

Navigation through the records in Bands View and Single Record View layout is allowed if the horizontal scrollbar is shown. Otherwise, end-users cannot navigate through the records. The horizontal scrollbar’s visibility is specified by the VGridControlBase.ScrollVisibility property.

See Also

Bands View Layout

Multiple Records View Layout

Single Record View Layout