Skip to content

RowGroup

Reference

The ability to group rows in a table can let an end user quickly and easily see the structure of the data shown, and also present them with summaries of the data shown in each group. RowGroup adds this ability to DataTables with the ability to customise the start and end grouping rows displayed in the DataTable, letting you integrate the summarised data to fit perfectly in with your site.

Enable the RowGroup extension for DataTables.

.RowGroup(true)
Or, configure it.
.RowGroup(rg => rg.DataSrc("age").ClassName("table-group"))

ClassName

Set the class name to be used for the grouping rows.

.ClassName("table-group")

DataSrc

Set the data point to use as the grouping data source.

.DataSrc(2)
.DataSrc("age")
.DataSrc("age", "name")

EmptyDataGroup

Text to show for rows which have null, undefined or empty string group data.

.EmptyDataGroup("No categories assigned yet")

Enable

Provides the ability to disable row grouping at initialisation.

.Enable(false)

EndClassName

Set the class name to be used for the grouping end rows.

.EndClassName("table-end-group")

EndRender

Provide a function that can be used to control the data shown in the end grouping row.

.EndRender("functionName")

StartClassName

Set the class name to be used for the grouping start rows.

.StartClassName("table-start-group")

StartRender

Provide a function that can be used to control the data shown in the start grouping row.

.StartRender("functionName")