---
id: "T:cAlgo.API.GridRow"
kind: "interface"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# GridRow (interface)

Represents the row of the grid.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Never available in the CLI: it is only returned by members that do not work there (Grid.AddRow, Grid.Rows).
- Cloud: Never available in the cloud: it is only returned by members that do not work there (Grid.AddRow, Grid.Rows).

## Definition

```csharp
public interface GridRow
```

## Examples

C#:

```csharp
var grid = new Grid(2, 1) { ShowGridLines = true, Height = 120 };
GridRow headerRow = grid.Rows[0];
headerRow.SetHeightInPixels(30);
grid.Rows[1].SetHeightInStars(1);
grid.AddChild(new TextBlock { Text = "Header" }, 0, 0);
Chart.AddControl(grid);
```

Python:

```python
grid = Grid(2, 1)
grid.ShowGridLines = True
grid.Height = 120
headerRow = grid.Rows[0]
headerRow.SetHeightInPixels(30)
grid.Rows[1].SetHeightInStars(1)
header = TextBlock()
header.Text = "Header"
grid.AddChild(header, 0, 0)
api.Chart.AddControl(grid)
```

## Methods

- `void SetHeightInPixels(double value)` — Sets the height of the grid row in pixels. [details](https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/SetHeightInPixels/index.md)
- `void SetHeightInStars(double stars)` — Sets the height of the grid row in stars. [details](https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/SetHeightInStars/index.md)
- `void SetHeightToAuto()` — Sets the height of the grid row to automatic. [details](https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/SetHeightToAuto/index.md)

## Properties

- `GridLength Height {get;}` — Gets the height of the grid row. [details](https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/Height/index.md)
- `int Index {get;}` — Gets the grid row index. [details](https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/Index/index.md)
- `double MaxHeight {get; set;}` — Gets or sets the maximum height of the grid row. [details](https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/MaxHeight/index.md)
- `double MinHeight {get; set;}` — Gets or sets the minimum height of the grid row. [details](https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/MinHeight/index.md)

