简体   繁体   中英

Disable collapsing in Silverlight DataGrid group header

How can I disable the collapsing in Silverlight DataGrid group header row? I don't want to hide that row!

Add this to the Xaml of your data grid:-

        <sdk:DataGrid.RowGroupHeaderStyles>
            <Style TargetType="sdk:DataGridRowGroupHeader">
                <Setter Property="IsEnabled" Value="False"/>
            </Style>
        </sdk:DataGrid.RowGroupHeaderStyles>

try this

private void datagrid_LoadingRowGroup(object sender, DataGridRowGroupHeaderEventArgs e)
{
   e.RowGroupHeader.IsHitTestVisible = false;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM