# Vertical Scroll

## Content



By default, the grid has only one horizontal split, with split index 0, and its [HScrollBar](/componentone/docs/win/online-truedbgrid/) and [VScrollBar](/componentone/docs/win/online-truedbgrid/) style property is set to [ScrollBarStyleEnum.Automatic](/componentone/docs/win/online-truedbgrid/). That is, the horizontal or vertical scroll bar will appear as necessary depending upon the column widths and the number of data rows available. The default split's [HorizontalScrollGroup](/componentone/docs/win/online-truedbgrid/) and [VerticalScrollGroup](/componentone/docs/win/online-truedbgrid/) properties are set to 1. Splits having the same scroll group property setting will scroll vertically or horizontally together. When a new split is created, it will inherit both the state of the scroll bars and the Scroll Group properties from the parent split. If all of the splits belonging to the same [HorizontalScrollGroup](/componentone/docs/win/online-truedbgrid/) or [VerticalScrollGroup](/componentone/docs/win/online-truedbgrid/) have their [HScrollBar](/componentone/docs/win/online-truedbgrid/) and [VScrollBar](/componentone/docs/win/online-truedbgrid/) style property is set to [ScrollBarStyleEnum.Automatic](/componentone/docs/win/online-truedbgrid/), then **True DBGrid** will display the vertical scroll bar or horizontal scroll bar only at the rightmost or bottommost split of the scroll group. Manipulating this single scroll bar will cause all splits in the same scroll group to scroll simultaneously.

For example, two additional splits can be created with the following code:

```csharp
// Create a Split at the left.
this.c1TrueDBGrid1.InsertHorizontalSplit(0);
// Create another.
this.c1TrueDBGrid1.InsertHorizontalSplit(0);
```

All three splits will have the same [HScrollBar](/componentone/docs/win/online-truedbgrid/) and [VScrollBar](/componentone/docs/win/online-truedbgrid/) settings and [VerticalScrollGroup](/componentone/docs/win/online-truedbgrid/) setting of **1**. However, only one vertical scroll bar will be displayed, within the rightmost split. When the user operates this scroll bar, all three splits will scroll simultaneously.

Vertical splits react in the same manner. After adding two vertical splits to the grid, all of the splits have the same [HorizontalScrollGroup](/componentone/docs/win/online-truedbgrid/) value of **1**. Thus there is only one horizontal scroll bar at the bottom of the grid, and if this scroll bar is scrolled all three splits will scroll simultaneously.

Change one of the scroll group properties of the splits to create split groups that scroll independently. In the preceding example, setting the [HorizontalScrollGroup](/componentone/docs/win/online-truedbgrid/) property of the middle split to **2** creates a new scroll group:

```csharp
this.c1TrueDBGrid1.Splits[0,1].HorizontalScrollGroup = 2;
```