Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
420
GroupByRecordPresenter Indentation
posted

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!

Parents
No Data
Reply
  • 69686
    Suggested Answer
    posted

    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);

                }

            }

        }

Children