# Sizing

## Content



True DBGrid lets you manipulate the size of grid rows, such as set the row height and auto-adjust the row height.

## Set Row Height

True DBGrid provides the [RowHeight](/componentone/docs/win/online-truedbgrid/) property of [Frame](/componentone/docs/win/online-truedbgrid/) class to set row height across the grid. You can also specify the height of a particular row by setting **Height** property of the Row class. Default value of the **Height** property is -1 which indicates that the row is taking height specified by the **DefaultSize** property.

Use the code below to set the default height of a row of the WinForms True DBGrid.

```csharp
// Setting height of the all the rows
c1TruedbGrid1.RowHeight = 30;
```

But if you have to set a particular row's width, use the code snippet below:

```csharp
//setting a Row's height
var row = c1TruedbGrid1.Splits[0].Rows[1];
row.Height = 60;
```

The True DBGrid control also lets you decide whether all the rows should have the same height or different heights using the [RowSizingEnum](/componentone/docs/win/online-truedbgrid/) enumeration.

```csharp
//if it is AllRows, all rows will have same height
c1TruedbGrid1.AllowRowSizing = RowSizingEnum.AllRows;
//if it is IndividualRows , rows can have separate heights
c1TruedbGrid1.AllowRowSizing = RowSizingEnum.IndividualRows;
```

## Auto-adjust Row Height

To adjust the row height, you can simply use the [AutoSize](/componentone/docs/win/online-truedbgrid/) method.

```csharp
//call autosize for each row
foreach (ViewRow row in c1TruedbGrid1.Splits[0].Rows) {
    row.AutoSize();
}
```