ComponentOne DataGrid for WPF and Silverlight
DataGrid for WPF and Silverlight Overview / DataGrid Features / Row Details / Disabling Row Details Toggling
In This Topic
    Disabling Row Details Toggling
    In This Topic

    When the grid includes a child grid or you've created a master-detail grid, by default the row details can be toggled so that they are visible or collapsed. If you choose, however, you can disable the toggling the details row feature by setting the CanUserToggleDetails property to False. Note that you will need to have a grid with row details to view the change in this example.

    At Design Time

    To disable toggling row details, complete the following steps:

    1. Click the C1DataGrid control once to select it.
    2. Navigate to the Properties window and locate the CanUserToggleDetails property.
    3. Clear the check box next to the CanUserToggleDetails property.

    In XAML

    For example to disable toggling row details, add CanUserToggleDetails="False" to the <c1:C1DataGrid> tag so that it appears similar to the following:

    <c1:C1DataGrid Name="c1datagrid1" Height="180" Width="250" CanUserToggleDetails="False" />

    In Code

    For example, to disable toggling row details, add the following code to your project:

    Visaul Basic
    Copy Code
    Me.C1DataGrid1.CanUserToggleDetails = False
    
    C#
    Copy Code
    this.c1DataGrid1.CanUserToggleDetails = false;
    

    What You've Accomplished

    Run the application and observe that you can no longer toggle the row details in the grid at run time. The arrow icon in the row header that indicates that row details can be toggled is no longer visible so toggling rows is not an option.