Hi, by default each level of grouping is indented, so if I group by two fields I got something like this:
How can I get rid of this indentation (restyling or setting the properties)? I want the grid to look more like this:
Thanks!
Hello,
I believe there is not direct way of suppressing this indentation, but you can create a style for the GroupByRecordPresenter and create a converter for its RenderTransform (TranslateTransform) bound to its NestingDepth property. For example :
<Style TargetType="{x:Type igDP:GroupByRecordPresenter}">
<Setter Property="RenderTransformOrigin" Value="0.5,0.5" />
<Setter Property="RenderTransform" Value="{Binding Path=NestingDepth, Converter={StaticResource conv}}" />
</Style>
where the converter looks like :
public class TranslateTransformConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
if (value == null)
return Binding.DoNothing;
else
int depth = (int)value;
return new TranslateTransform(-(depth * 17), 0);
}
This works well for the groupings, but I did a TranslateTransform (-17) on the actual rows and the headers and I ended up with rows and headers that don't go all the way to the right side of the grid. How can I make headers and rows that start at the left side and go all the way to the right in a group by grid. Is there a way to trick the headers and rows into thinking they have more space? Or is there a template change that would work?