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
605
Multiple ColumnLayouts Header-Background
posted

Hello

I have defined multiple ColumnLayouts in the XamGrid. By doing this an in-between layer is added where the layout is selected (this is correct for my use).
How can I set different background colors for these new in-between layers (see image)?
For a regular column listing the following code works great for background color, however not in the case described above and in the image.

<Style TargetType="{x:Type igPrim:HeaderCellControl}">
       <Setter Property="Background" Value="Red"/>
</Style>

Sincerely,

Kasar

Code:

<ig:XamGrid>
      <ig:XamGrid.Columns>
        ...
        Columns
        ...
        <ig:ColumnLayout Key="Layout1" HeaderVisibility="False">
        ...
        </ig:ColumnLayout>
        <ig:ColumnLayout Key="Layout2" HeaderVisibility="False">
        ...
        </ig:ColumnLayout>
        <ig:ColumnLayout Key="Layout3" HeaderVisibility="False">
        ...
        </ig:ColumnLayout>
      </ig:XamGrid.Columns>
   </ig:XamGrid>

Parents
  • 34830
    Verified Answer
    Offline posted

    Hello kasar,

    Thank you for your post!

    I have been investigating into this, and the reason that your style for HeaderCellControl is not working in this case, is because the elements you are trying to style are not HeaderCellControls, but they are ChildBandCellControls. If you write a style for igPrim:ChildBandCellControl, you will see your background colors take effect. Also, if by chance you want a different style on each of the child bands, you can utilize the ChildBandHeaderStyle property on each of the ColumnLayout objects in your XamGrid.

    I hope this helps you. Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer
    Infragistics Inc.
    www.infragistics.com/support

Reply Children
No Data