We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How do I freeze rows on a DataGrid?

I can't find any documentation or examples on how to freeze a row in the Datagrid. I can only find that it is mentioned in the Release documentation for the DataGrid control that you can do it.

How do I freeze a row in a Datagrid. Is it possible to do in WPF or must it be code behind?

Is it possible to Freeze a row that is a GroupHeader?

I.e. as I scroll down the datagrid the group header is froze at the top of the datagrid untill the next Group scrolls onto the page

1 Reply

HN Harikrishnan N Syncfusion Team September 18, 2015 03:17 PM UTC

Hi James,

Thank you for using Syncfusion products.

You can freeze rows in SfDataGrid by setting the SfDataGrid.FrozenRowsCount property. The number of rows specified to this property will be frozen in view. You can set this in both XAML and code behind. Please refer the below code example.


<sfgrid:SfDataGrid x:Name="dataGrid"

                        ItemsSource="{Binding OrdersInfo}"

                        FrozenRowsCount="2" />

For CodeBehind:

SfDataGrid dataGrid = new SfDataGrid();
dataGrid.FrozenRowsCount = 2;

Regarding your query to freeze GroupHeader, it is possible to freeze a GroupHeader in SfDataGrid but currently the frozen group header will not be replaced when the next group comes to top.
However we consider your requirement as a Feature request. A support incident to track the status of this feature has been created under your account. Please log on to our support website to check for further updates.


Regarding our documentation, we have already planned to update our UGDocumentation in detail, which includes the API usages, explanation and few basic “How to” sections which will explain about some customizations that can be done in SfDataGrid. Our UGdocuments will be updated in the midst of October, 2015. We appreciate your patience until then.

Please let me know if you have any question.


Live Chat Icon For mobile
Up arrow icon