New to Telerik UI for .NET MAUI?Start a free 30-day trial

.NET MAUI DataGrid Grouping UI

Grouping UI

Telerik UI for .NET MAUI DataGridprovides a built-in grouping functionality, which allows the user to easily group the data by one or more columns.

TheDataGrid Grouping UIexposes theDataGridServicePanelview which contains theDataGridGroupingPanelin itself. In order to group data the user has to drag the desired column header to theDataGridGroupingPanellocated at the top of the DataGrid.

The user can drag more than one column into the panel.

Configuration

In order to manipulate the state of theGrouping UIyou can use the following properties:

  • UserGroupMode(enumof typeTelerik.Maui.Controls.Compatibility.DataGrid.DataGridUserGroupMode) - TheUserGroupModeproperty of the RadDataGrid determines whether the Grouping UI is enabled or disabled. The default value isAuto.
  • CanUserGroup(boolof typeTelerik.Maui.Controls.Compatibility.DataGrid.DataGridColumn) - TheCanUserGroupproperty of the DataGridColumn determines whether the end-user can drag & drop the column header onto the grouping panel. The default value isTrue.

Disabling Grouping

There are two ways to disable grouping. The first one is on a DataGrid level by using theUserGroupModeproperty. By setting it toDisabledtheDataGridGroupingPanelgets hidden and the drag and drop function is disabled.

The following example demonstrates how to disable the Grouping UI in the DataGrid:

     

The second way is to disable grouping on a DataGridColumn level. By using theCanUserGroupproperty and setting it toFalsethe grouping for the specific column is disabled.

The following example demonstrates how to disable the grouping for a specific column:

     

See Also

In this article
Not finding the help you need?
Baidu
map