Disable collapsing in Silverlight DataGrid group header
How can I disable the collapsing in Silverlight DataGrid group header row? I don't want to hi开发者_JAVA技巧de 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;
}
精彩评论