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
165
How to set different look on level band columns in hierarcy grid?
posted

Hi!

I am trying to figure out how to apply different appearance on each level of the grid, on the GridColumnHeaders and GridRowSelector. See image below, it is apparantly supposed to be possible. In AppStylist, I have created the looks I want as resources, and was thinking to just apply the resource to the properties mentioned above.

BUT - the two properties are common for all levels! There is no way to say "level 1 GridColumnHeader should have resource A" and "level 2 GridColumnHeader should have resource B".

Help!

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    You are probably using the appearance properties on the DisplayLayuot (which apply to the entire grid) instead of the ones on the Band (which apply only to that band).


            private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
            {
                // Applies to all bands
                e.Layout.Override.RowSelectorAppearance.StyleResourceName = "My Style";

                // Applies only to the individual band (and overrides any settings on the Layout.
                e.Layout.Bands["My second band"].Override.RowSelectorAppearance.StyleResourceName = "My second band style";
            }

     

    You can, in fact, set both. The more specific setting on the band will override the less specific ones on the Layout.

Children