Tree Grid / Columns / Column Spanning

Blazor Tree Grid Example - Row and Column Spanning

Loading Syncfusion Blazor Server Demos…

This sample demonstrates automatic cell merging in Tree Grid, allowing adjacent cells with identical values to be combined horizontally, vertically, or in both directions for a cleaner, more readable layout.

Cell merging options are enabled by using the AutoSpan property of the Tree Grid. The AutoSpan property is bound to a dropdown, which lists options to select a cell merging mode and combine adjacent cells based on the selected mode.

By default, the dropdown is set to AutoSpanMode.HorizontalAndVertical, which merges identical cells across both rows and columns for improved readability. Selecting a different AutoSpanMode option applies the corresponding cell merge behavior. To restore the original Tree Grid layout, set the dropdown to AutoSpanMode.None, which disables cell merging.

Available Modes:

  • None - No merging applied (default)
  • Row - Merges identical cells horizontally across columns within the same row
  • Column - Merges identical cells vertically down the same column
  • HorizontalAndVertical - Applies both horizontal and vertical cell merging simultaneously

More information about row and column auto spanning can be found in the documentation section.

Transform your Blazor web apps today with Syncfusion® Blazor components
145+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE