# .NET MAUI DataGrid Frozen Columns

This article describes the frozen columns feature that the [.NET MAUI DataGrid](https://www.telerik.com/maui-ui/documentation/controls/datagrid/overview) provides.

You can pin a column on the left side of the grid by setting the `IsFrozen`(`bool`) property to the column. By default the value is `False`. When setting it to `True` to a concrete column, it makes the column frozen.

**Frozen column in the .NET MAUI DataGrid**

![.NET MAUI DataGrid showing a frozen column while horizontal scrolling](https://www.telerik.com/maui-ui/documentation/assets/23538ad23706017b63c4f73f24b0fa2d/frozen-column.gif)

Set the column freeze in XAML

```XAML
<telerik:RadDataGrid x:Name="grid" 
                     ItemsSource="{Binding Clubs}" 
                     AutoGenerateColumns="False">
    <telerik:RadDataGrid.Columns>
        <telerik:DataGridTextColumn PropertyName="Name" 
                                    IsFrozen="True"
                                    HeaderText="Name"/>
    </telerik:RadDataGrid.Columns>
</telerik:RadDataGrid> 
```

Set the column freeze programmatically.

```C#
this.grid.Columns[0].IsFrozen = !this.grid.Columns[0].IsFrozen;
```

## Collection of Frozen Columns

Once a column is frozen, it is added to the `FrozenColumns` collection (read-only collection). The collection can be used only for read-only purposes and cannot be modified. Freezing/Unfreezing the columns is done only through the `IsFrozen` property of the columns.

## Group Header and Frozen Columns

In a scenario with frozen columns and grouping, you can specify whether the group header will be clipped to the bounds of the frozen area by setting the `AreGroupHeadersClippedWhenFrozen` (`bool`) property. The default value is `False`.

Here is the result when the `AreGroupHeadersClippedWhenFrozen` property is set:

![.NET MAUI DataGrid showing frozen columns with clipped group headers](https://www.telerik.com/maui-ui/documentation/assets/1d73ea72f4d9f7b3f2f2ac53c9ee1759/frozen-columns-group-headers.gif)

## Styling

When there is/are frozen column(s) a splitter UI is visualized. The splitter UI splits the frozen columns from the unfrozen.

You can style the frozen splitter UI using the `FrozenColumnsSplitterStyle`(`Telerik.Maui.Controls.DataGrid.DataGridFrozenColumnsSplitterAppearance`) property. The `FrozenColumnsSplitterStyle` property is a property of the DataGrid. It cannot be set on a specific column.

Style the splitter UI's `Width`, `BackgroundColor`, `BorderColor` and `BorderThickness`.

> caption Example for `FrozenColumnsSplitterStyle`

```XAML
<telerik:RadDataGrid.FrozenColumnsSplitterStyle>
    <Style TargetType="telerik:DataGridFrozenColumnsSplitterAppearance">
        <Setter Property="Width" Value="20" />
        <Setter Property="BorderColor" Value="Gray" />
        <Setter Property="BorderThickness" Value="2" />
        <Setter Property="BackgroundColor" Value="LightBlue" />
    </Style>
</telerik:RadDataGrid.FrozenColumnsSplitterStyle>
```

> caption Frozen columns splitter styling in the .NET MAUI DataGrid

![.NET MAUI DataGrid showing a styled frozen columns splitter](https://www.telerik.com/maui-ui/documentation/assets/e2d47a0fe448ff112e014438c12eda4b/frozen-column-style.png)

## See Also

* [Picker Column](https://www.telerik.com/maui-ui/documentation/controls/datagrid/columns/column-types/combobox-column)
* [Template Column](https://www.telerik.com/maui-ui/documentation/controls/datagrid/columns/column-types/template-column)
* [Text Column](https://www.telerik.com/maui-ui/documentation/controls/datagrid/columns/column-types/text-column)
