# Sizing and Splitting

## Content

The following sections describe how users can resize rows, columns, and splits. Restrict any or all of these operations at design time or in code.

## Size rows

If the [AllowRowSizing](/componentone/docs/win/online-truedbgrid/) property is set to either **RowSizingEnum.AllRows** or **RowSizingEnum.IndividualRows**, the user can change the row height at run time. When the user points to a row divider in the record selector column, the pointer changes to a vertical double arrow that the user can drag to adjust the height of all rows.
![](https://cdn.mescius.io/document-site-files/images/a1b176e5-6638-4b1f-a786-e41a817558bb/images/row-sizing.png)

Dragging the pointer upward makes the rows smaller; dragging it downward makes the rows larger. If the property is set to **AllRows**, then all rows in the grid will be resized to the same height; it is not possible to resize individual rows. If the property is set to **IndividualRows**, then each row can be sized independently.

In addition, if the grid does not display the record selector column (that is, the [RecordSelectors](/componentone/docs/win/online-truedbgrid/) property is **False**), users cannot interactively change the row height.

The [RowHeight](/componentone/docs/win/online-truedbgrid/) property of the grid will be adjusted when the user completes the resize operation.

Prevent row resizing from occurring at run time by setting the ***Cancel*** argument to **True** in the [RowResize](/componentone/docs/win/online-truedbgrid/) event. Change the **RowHeight** of the grid in code, even if [AllowRowSizing](/componentone/docs/win/online-truedbgrid/) is RowSizingEnum.None or the **RowResize** event is cancelled.

## Size columns

If the [AllowSizing](/componentone/docs/win/online-truedbgrid/) property is **True** for a column, the user can adjust the width of the column individually at run time. When the user points to the divider at the right edge of a column's header, the pointer changes to a horizontal double arrow that the user can drag to resize the column in question.
![](https://cdn.mescius.io/document-site-files/images/a1b176e5-6638-4b1f-a786-e41a817558bb/images/column-sizing.png)

Dragging the pointer to the left makes the column smaller; dragging it to the right makes the column larger. The column's [Width](/componentone/docs/win/online-truedbgrid/) property will be adjusted when the user completes the resize operation.

If the grid does not display column headers (that is, the [ColumnHeaders](/componentone/docs/win/online-truedbgrid/) property is **False**), the horizontal double arrow will appear when the pointer is over the column divider within the grid's data area.

If the user drags the pointer all the way to the left, the column retains its original **Width** property setting, but its [Visible](/componentone/docs/win/online-truedbgrid/) property is set to **False**. To make the column visible again, the user can point to the right side of the divider of the column that preceded it. The pointer turns into a vertical bar with a right arrow.
![](https://cdn.mescius.io/document-site-files/images/a1b176e5-6638-4b1f-a786-e41a817558bb/images/pointer.png)

Dragging the pointer to the right establishes a new column width and sets the column's **Visible** property back to **True**.

Another way to resize columns is to use the [AutoSize](/componentone/docs/win/online-truedbgrid/) method to specify auto-sizing for a specific **Column** object in code. When a column is auto-sized, its width is adjusted to fit the longest *visible* field in that column. Longer records that are not displayed in a visible row when **AutoSize** is invoked do not participate in the width calculations. Furthermore, if the specified column is either hidden or scrolled out of view, a trappable error occurs.

Prevent column resizing from occurring at run time by setting the ***Cancel*** argument to **True** in the [ColResize](/componentone/docs/win/online-truedbgrid/) event. Change the width of a column in code, even if [AllowSizing](/componentone/docs/win/online-truedbgrid/) is **False** for that column.