0
votes

I've a simple Silverlight DataGrid bound to a PagedCollectionView that has a group description. Grouping works fine.

What I want to do is remove the leading space on each grid row that is blank and have the actual cell content (it's just a one column grid) fill the entire row. I can't for the life of me find out how to do that.

Just to be clear, the leading space I'm referring to is something like a pseudo-column that appears to correspond to the group collapse/expand indicator width. It's just the way the DataGrid works with grouping out of the box I guess, indenting the rows so the grouping pops out more, like so:

data grid grouping image
(source: timheuer.com)

2

2 Answers

1
votes

Use a style to set the SubLevelIndent:

<data:DataGrid.RowGroupHeaderStyles>
    <Style TargetType="data:DataGridRowGroupHeader">
        <Setter Property="SublevelIndent" Value="0" />
    </Style>
</data:DataGrid.RowGroupHeaderStyles>

see http://msdn.microsoft.com/en-us/library/system.windows.controls.datagridrowgroupheader.sublevelindent%28v=vs.95%29.aspx for more information

0
votes

Have you tried setting the datagrid headers visibility property to columns only:

<data:DataGrid HeadersVisibility="Column"...