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

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

# GridColumn.MaxWidth

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

## MaxWidth

Defines the grid column maximum width.

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.AddColumn, Grid.Columns).
- Cloud: Never available in the cloud: it is only returned by members that do not work there (Grid.AddColumn, Grid.Columns).

C#:

```csharp
double MaxWidth {get; set;}
```

Python:

```python
gridColumn.MaxWidth: float
```

### Returns

`double` — 

### Examples

C#:

```csharp
var grid = new Grid(1, 2);
grid.Columns[0].SetWidthToAuto();
grid.Columns[0].MaxWidth = 200;
Print("Maximum width: {0}", grid.Columns[0].MaxWidth);
```

Python:

```python
grid = Grid(1, 2)
grid.Columns[0].SetWidthToAuto()
grid.Columns[0].MaxWidth = 200
api.Print(f"Maximum width: {grid.Columns[0].MaxWidth}")
```

