---
id: "M:cAlgo.API.GridRow.SetHeightInPixels(System.Double)"
kind: "method"
type: "T:cAlgo.API.GridRow"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/SetHeightInPixels/"
---

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

# GridRow.SetHeightInPixels

Member of [GridRow](https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/index.md).

## SetHeightInPixels(double value)

Sets the height of the grid row in pixels.

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).

C#:

```csharp
void SetHeightInPixels(double value)
```

Python:

```python
gridRow.SetHeightInPixels(value: float) -> None
```

### Parameters

- `value` (`double`, Python `float`): The value.

### Examples

C#:

```csharp
var grid = new Grid(2, 1);
grid.Rows[0].SetHeightInPixels(30);
grid.AddChild(new TextBlock { Text = "Fixed 30 px row" }, 0, 0);
Chart.AddControl(grid);
```

Python:

```python
grid = Grid(2, 1)
grid.Rows[0].SetHeightInPixels(30)
textBlock = TextBlock()
textBlock.Text = "Fixed 30 px row"
grid.AddChild(textBlock, 0, 0)
api.Chart.AddControl(grid)
```

