Edit this page

Toggle RowDetails Column

GridViewToggleRowDetailsColumn derives from GridViewColumn class, which means that it isn't used to display data. The column is represented by an GridViewToggleButton control. Clicking on it will show RowDetails if they are available.

You should either configure RadGridView.RowDetailsVisibilityMode property to control the state of all grid rows or use a GridViewToggleRowDetailsColumn to control the state of each individual row. Since GridViewToggleRowDetailsColumn operates on the respective GridViewRow.DetailsVisibilityProperty, having a RadGridView.RowDetailsVisibilityMode different from collapsed might lead to unexpected results.

Here is a list of the most important properties.

  • ToggleButtonStyle - allows you to apply a style to the toggle button.

  • ExpandMode - allows you to specify, whether only one row details can be visible on a time. The possible values are:

    • Single
    • Multiple (default).

If ExpandMode property is set to Single, expanding a new row with the toggle button will collapse the previous one.

[XAML] Example 1: Define GridViewToggleRowDetailsColumn in XAML.

<telerik:RadGridView x:Name="radGridView"
                 AutoGenerateColumns="False">
    <telerik:RadGridView.Columns>
        <telerik:GridViewToggleRowDetailsColumn />
        <!--...-->
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

See also: