I have a datagrid in one of my WPF application where I am showing some data from an XML file. Now there are rows which are kind of a headers. I want to show those rows with colspan, so that it occupies the whole row. I have tried the below code but it is not working.
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Style.Triggers>
<DataTrigger Binding="{Binding Type}" Value="BorderCheck">
<Setter Property="Grid.ColumnSpan" Value="6" />
</DataTrigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>