React Data Grid

Row Grouping - Unbalanced Groups

react logo

This section covers Unbalanced Groups - when grouping by rows that can contain null or undefined group values.

Handling Unbalanced Groups

By default, unbalanced rows (rows containing null, undefined or empty values for the column that is being grouped) get grouped together as (Blanks). To instead have the nodes remain ungrouped, you can enable the groupAllowUnbalanced grid option. We refer to this scenario as Unbalanced Groups in that there is a mix of groups and rows as siblings.

The following example demonstrates:

  • The groupAllowUnbalanced grid option has been set to true.
  • Data is grouped by column 'State'. Rows are either grouped by state 'New York', 'California' or not grouped.
  • Removing the grouping shows that the non grouped rows have no 'State' value.

The unbalanced group feature is not supported when using the Server SideRow Model (SSRM)

Balanced Groups

When not using unbalanced groups, the grid will, by default, create a (Blanks) group and populate it with any rows without a valid group value. The following example demonstrates this default behaviour: