Search results

Frozen Rows and Columns in ASP.NET Core Tree Grid control

08 Dec 2021 / 2 minutes to read

Frozen rows and columns

Frozen rows and columns provides an option to make rows and columns always visible in the top and left side of the tree grid while scrolling.

In this demo, the frozenColumns is set as ‘2’ and the frozenRows is set as ‘3’. Hence, the left two columns and top three rows are frozen.

freezecolumn.cs
Copied to clipboard
public IActionResult FrozenColumn()
        {
            ViewBag.datasource = TreeData.GetDefaultData();
            return View();
        }

Freeze particular columns

To freeze particular column in the tree grid, the isFrozen property of e-treegrid-column tag helper can be used.

In this demo, the columns with field name TaskName and StartDate is frozen using the isFrozen property of e-treegrid-column.

isfreeze.cs
Copied to clipboard
public IActionResult FrozenColumn()
        {
            ViewBag.datasource = TreeData.GetDefaultData();
            return View();
        }

Freeze direction

You can freeze the tree grid columns on the left or right side by using the column.freeze property and the remaining columns will be movable. The tree grid will automatically move the columns to the left or right position based on the column.freeze value.

Types of the column.freeze directions:

  • Left: Allows you to freeze the columns at the left.
  • Right: Allows you to freeze the columns at the right.

In this demo, the Task Name column is frozen at the left and the Priority column is frozen at the right side of the content table.

freeze-direction.cs
Copied to clipboard
public IActionResult FrozenColumn()
{
    ViewBag.datasource = TreeData.GetDefaultData();
    return View();
}
  • Freeze Direction is not compatible with the isFrozen and frozenColumns properties.

Limitations of frozen tree grid

The following features are not supported in frozen rows and columns:

  • Row Template
  • Detail Template
  • Cell Editing

Freeze Direction feature has the below limitations, along with the above mentioned limitations.

  • Infinite scroll cache mode
  • Freeze direction in the stacked header is not compatible with column reordering.

You can refer to our ASP.NET Core Tree Grid feature tour page for its groundbreaking feature representations. You can also explore our ASP.NET Core tree grid example ASP.NET Core Tree Grid example to knows how to present and manipulate data.