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
900
How to apply different style for first row (hierarchial data)
posted

Hi Support,

Please suggest how to apply different style for First row of Level 2, in a 4 Level Hierarchial xamDataPresenter or xamDataGrid.

Thanks,

Shakti

  • 138253
    Offline posted

    Hello Shakti,

     

    Thank you for your post. I have been looking into it and I suggest you use the following Style for the DataRecordPresenter:

    <Style TargetType="{x:Type igDP:DataRecordPresenter}">
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding RelativeSource={RelativeSource Mode=Self},Path=Record.NestingDepth}" Value="2"/>
                    <Condition Binding="{Binding RelativeSource={RelativeSource Mode=Self},Path=Record.Index}" Value="0"/>                            
                </MultiDataTrigger.Conditions>
                <MultiDataTrigger.Setters>
                    <Setter Property="Background" Value="Red"/>
                </MultiDataTrigger.Setters>
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>
    

     

    I used MultiTrigger to check the Record’s Index and NestingDepth and if they match 0 and 2 I add Setters to the DataRecordPresenter. Please let me know if this helps you or you need further assistance on this matter.

     

    Looking forward for your reply.

  • 900
    posted

    I would really appreciate a quick response.