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

.NET MAUI DataGrid Row Details Overview

The Telerik UI for .NET MAUI DataGrid control is capable of presenting additional information through the Row Details functionality. The Row Details is a Data Template defined on the grid or row level and is used for displaying data without affecting the dimensions of the row and the cells within it.

DataGrid Row Details Overview

To show the Row Details, you can use the following exposed options:

  • The default DataGridToggleRowDetailsColumn column —Allows showing and hiding the row details for an item. For additional information, refer to the DataGrid Toggle Row Details Column

  • For example, on a selection without using the default column. For this case you need a custom implementation.

Here is a sample implementation inside the DataGrid SelectionChanged event:

void dataGrid_SelectionChanged(System.Object sender, DataGridSelectionChangedEventArgs e)
{
    RadDataGrid dataGrid = sender as RadDataGrid;

    foreach (var item in e.AddedItems)
    {
        dataGrid.ExpandedRowDetails.Add(item);
    }
    foreach (var item in e.RemovedItems)
    {
        dataGrid.ExpandedRowDetails.Remove(item);
    }
}

The DataGrid exposes the following properties that control the row details functionality:

  • AreRowDetailsFrozen (type bool)—The property indicates whether the row details keep their position during horizontal scroll.

  • ExpandedRowDetails (type IList)—Defines the collection of items that have expanded row details.

  • CanUserExpandMultipleRowDetails (type bool)—The property indicates whether multiple row details can be expanded.

For an outline of all DataGrid features review the .NET MAUI DataGrid Overview article.

Next Steps

See Also

In this article