GroupLevelIndicatorPane causes ColumnStretchMode=ALL to not fit columns

111 views Asked by At

I have an Xceed datagrid that uses ColumnStretchMode=ALL to make the columns fit in the grid.

It has been working perfectly, until I added a GroupLevelIndicatorPane. Once I added that, the grid no longer fits right (it is off by the width of the GroupLevelIndicatorWidth amount).

I have been looking for a way to cause this calculation to take that pane into account with out any luck.

Has anyone else ever seen this with the Xceed controls? (I don't have current Xceed support so they will not help me.)

UPDATE: I found out why this was happening. I had something to this effect in my grid setup:

<Style TargetType="{x:Type xcdg:GroupLevelIndicatorPane}">
   <Setter Property="Visibility" Value="{Binding RelativeSource=
           {RelativeSource FindAncestor, AncestorType={x:Type xcdg:DataRow}},
           Path=DataContext.ShouldIndent, Converter=
           {StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}" />       
</Style>

I caused the GroupLevelIndicatorPane to be collapsed for some types of groups. I took it out and the calculations started working right again.

Guess I need to find another way to have some groups not indent.

1

There are 1 answers

0
Vaccano On

Turns out I had to apply the visibility on the actual GroupLevelIndicatorPane (not on the style). Once I did that the ColumnStretchMode=ALL calculated correctly.

Not sure why it matters, but it does.