Row Details
Each RadGridView
row is capable of presenting additional information by means of a the row details feature of the DataGrid.
To enable the row-details functionality, set RowDetailsDisplayMode
to Single
and assign a specific RowDetailsTemplate
to the DataGrid. The row and the row details share the same data context, so you are free to bind the elements in your template to any of the properties of the data item.
You also need to utilize the ShowRowDetailsForItem
and HideRowDetailsForItem
methods of the DataGrid for expanding or collapsing the row-details content. The row details for a single row can be displayed at a time, so opening a RowDetails
panel automatically hides the previously displayed one (if any).
Using the RowDetailsTemplate
The following examples respectively demonstrate a DataGrid with a custom column containing a CheckBox, which is used for showing the row details, and show how the DataGrid is populated with data and the logic for changing the row that visualizes its row details.
DataGrid with RowDetailsTemplate
Populate the RadDataGrid and Handle the CheckBox Click Event
DataGrid with RowDetails