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
250
Set Margin of Header/Records at the 3rd Level of Hierarchical Grid using DataPresenter's DefaultStyle
posted

I have a Hierarchical Grid with 3 levels. Since the 3rd level doesn't have child records its records are not properly indented. I tried to set the margin manually in the field layout of the 3rd level and it worked.

 

<igDP:FieldLayout.Settings>

  <igDP:FieldLayoutSettings  AllowDelete="True">

    <igDP:FieldLayoutSettings.DataRecordPresenterStyle>

      <Style TargetType="{x:Type igDP:DataRecordPresenter}">

        <Setter Property="Margin" Value="40,0,0,0" />

      </Style>

    </igDP:FieldLayoutSettings.DataRecordPresenterStyle>

  </igDP:FieldLayoutSettings>

</igDP:FieldLayout.Settings>

But when I copied the template from the DefaultStyles folder where the product is installed i.e. “C:\Program Files\Infragistics\NetAdvantage 2010.2\WPF\DefaultStyles\DataPresenter” and modified by adding two thin rectangles on top and bottom in the DataRecordPresenter for having a rectangle in the headers, the margin (indentation) at 3rd level is removed.

 

How to set the margin to "40,0,0,0" when the nested level = 3 (using triggers or some other method) in the above DataPresenter default style.

 

Thanks

Prasanna