Home Forums WinForms controls Xceed Grid for WinForms DataRowTemplateStyles & DataRow Visibility

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #14923 |

    I have a 2 DataRowTemplateStyles in my grid so each DataRow alternates in color. The problem is when I set the visibility to one of my rows to false, the template doesn’t adjust. So I now have a pattern like this:

    Red
    Red
    Blue
    Red

    Where I still would like to maintain the pattern

    Red
    Blue
    Red
    Blue

    Does anyone know how I can get the DataRowTemplateStyle to disregard DataRows whose visibility is false?

    Imported from legacy forums. Posted by benjaminh (had 2392 views)

    User (Old forums)
    Member
    Post count: 23064

    This will not be possible with a TemplateStyle. An option would be to derive from DataRow, override IsBackColorAmbiant so it returns false, and override DefaultBackColor to return color 1 or 2.

    You could set a static boolean to the class which would tell if the color is now 1 or 2 for the current row.

    Imported from legacy forums. Posted by André (had 3586 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.