windowsforms-2463-controls-and-libraries-vertical-grid-layouts.md
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.
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:
vGridControl1.LayoutStyle = DevExpress.XtraVerticalGrid.LayoutViewStyle.SingleRecordView;
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:
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.
| Layout Style | Description |
|---|---|
| Bands View Layout | Key navigation through the records is disabled. Left and right arrow keys are used to navigate through the bands in this case. |
| Single Record View Layout | Key navigation is enabled only when the horizontal scrollbar is displayed. |
| Multiple Records View Layout | Key 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