---
id: "P:cAlgo.API.GridRow.Index"
kind: "property"
type: "T:cAlgo.API.GridRow"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/Index/"
---

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

# GridRow.Index

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

## Index

Gets the grid row index.

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
int Index {get;}
```

Python:

```python
gridRow.Index: int
```

### Returns

`int` — 

### Examples

C#:

```csharp
var grid = new Grid(0, 1);
var row = grid.AddRow();
grid.AddChild(new TextBlock { Text = "New row" }, row.Index, 0);
Print("Row index: {0}", row.Index);
```

Python:

```python
grid = Grid(0, 1)
row = grid.AddRow()
textBlock = TextBlock()
textBlock.Text = "New row"
grid.AddChild(textBlock, row.Index, 0)
api.Print(f"Row index: {row.Index}")
```

