Appearance

Freeze Panes

This section explains you how to set Freeze panes in SfDataGrid. SfDataGrid provides support to Freeze rows and columns at the top and also at the bottom similar to Excel Freeze panes. To enable Freeze panes in SfDataGrid you have to use the following properties.

Property Name Description
FrozenRowsCount Gets or Sets the count of frozen rows in top of the SfDataGrid.
FooterRowsCount Gets or Sets the count of frozen rows in footer of the SfDataGrid.
FrozenColumnCount Gets or Sets the count of frozen columns in left side of the SfDataGrid.
FooterColumnCount Gets or Sets the count of frozen columns in right side of the SfDataGrid

Limitations

  1. FreezePanes is not supported in DetailsViewGrid.
  2. FrozenRows is disabled when AllowFrozenGroupHeaders is set to True.
  3. Count should be less than the view port size.

The following code example illustrates how to use FreezePanes support in SfDataGrid.

  • xaml
  • <syncfusion:SfDataGrid AllowGrouping="True"
    
                           ShowGroupDropArea="True"
    
                           FrozenColumnCount="1"
    
                           FooterColumnCount="2"
    
                           FrozenRowsCount="2"
    
                           FooterRowsCount="1"
    
                           AllowFrozenGroupHeaders="False"
    
                           ShowRowHeader="True">

    The following screenshot displays the SfDataGrid with Freeze Panes support.

    NOTE

    1. While grouping, the FrozenColumnCount denotes only the actual DataColumns instead of any indent columns. So that the Indent columns automatically froze when initializing the FrozenColumnCount.
    2. Header and TableSummary rows that are frozen by default works regardless of the FrozenRowsCount and FooterRowsCount properties.
    3. The count should be less than the number of rows or columns in view.