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
415
inheriting row backcolor from parent row?
posted

Hi

I have a Ultragrid with two bands. the second band should inherit the backcolor from its parentrow.
is this somehow possible?

Currently I'm doing it like:

//InitializeRow event
if(e.Row.Band.Key == "FK_DispositionProducts_Disposition")
            {
                if(e.Row.ParentRow.Index % 2 == 0)
                    e.Row.Appearance.BackColor = e.Row.ParentRow.Band.Override.RowAppearance.BackColor;
                else
                    e.Row.Appearance.BackColor = e.Row.ParentRow.Band.Override.RowAlternateAppearance.BackColor;
            }

 

this code was just for testing, I know it will affect performance :-)

is there a better way to what I want?