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
45
Alternate Row colors...
posted

Hi ...

I have a UltraGrid which has nested Hierarchy(Child bands within Child bands).

I wanted to have Alternate colors for the rows in all bands and they should be in Sync .

Currently when I set the alternate color for the grid it sets the Alternate color for each band separately .I wanted to ignore the bands and the alternate color should be in sync for the whole grid.

How can I achieve this functionality? Any help please...

 

  • 469350
    Verified Answer
    Offline posted

     Hi,

        The grid does not currently have any support for this.

        You could try to apply an appearance to each row in the grid individually, but determining if a row is an alternate or not would be very tricky. And if you starting added and removing rows, this would get very complex and inefficient, because you would have to loop through every row below the deleted one and update it's appearance.

        Another option would be to use a DrawFilter. But again, this could be very inefficient, since each row would need to evaluate whether it was an alternate row or not every time it painted.

        So I don't see any efficient way to do this, unless your data is pretty static.