Welcome to the Xceed Community Sign in | Join | Help
Community Search  

Alternate Colors

Sort Posts: Previous Next
  •  04-24-2007, 12:49 AM Post no. 7756

    Alternate Colors

    Hi,

    how can i apply alternate colors to the gridcontrol.

  •  04-24-2007, 8:49 AM Post no. 7757 in reply to 7756

    Re: Alternate Colors

    Can you be a little more specific on what color you want to change?
    Marc Laroche
    Software Developer
    Xceed Software Inc.


    I don’t suffer from insanity, I enjoy every minute of it. - Unknown
  •  04-30-2007, 3:34 PM Post no. 7758 in reply to 7757

    Re: Alternate Colors

    I think the question refers to the ability to specify an Alternate Row color, similar to the .NET 2.0 DataGridView control. That control allows an Alternate Row color to be set, as well as a default row color. The row background color then alternates with each row.

    In other words, Row 0 has a white background, Row 1 has a gray background, Row 2 has a white background, Row 3 has a gray background, etc...

    I know that you can set cell styles, but I also have the same question as the orginal post -- can the alternating row colors be set without a lot of code to dynamically determine whether the row is odd or even?
  •  04-30-2007, 3:57 PM Post no. 7759 in reply to 7758

    Re: Alternate Colors

    We implemented something in version 1.1 to easily allow alternating "stuff" through triggers.

    Version 1.1 will be soon available... (beginning of May)

    Other than the trigger code, all that will be needed is a converter that convert an index into whatever value you want to trig on (allowing complex patterns).

    Marc Laroche
    Software Developer
    Xceed Software Inc.


    I don’t suffer from insanity, I enjoy every minute of it. - Unknown
  •  06-10-2008, 2:20 AM Post no. 12793 in reply to 7759

    Re: Alternate Colors

    Hi,

     Please let us know if this feature has been released now. This is a critical functionality for us to finalize the xceed grid evaluation.

    Regards,

    Raja S L N

  •  06-10-2008, 8:20 AM Post no. 12801 in reply to 12793

    Re: Alternate Colors

    The "Alternating DataRow Styles" in the Styling Elements topic demonstrates how to do this.

    Technical Writer - Xceed Software

    Of all the things I've lost, I miss my mind the most. - Mark Twain
    Filed under: ,
  •  06-10-2008, 10:02 AM Post no. 12806 in reply to 12801

    Re: Alternate Colors

    Hmm interesting.

    If you wanted to let the user turn this on and off with perhaps a checkbox.  How would you go about this?  Also if you wanted to let the user select the colors would you have to do it all programmatically?

     

     

  •  06-10-2008, 11:13 AM Post no. 12811 in reply to 12806

    Re: Alternate Colors

    While I am not sure there are nice 100% code-less approaches to scenarios such as the one you described, there are ways to preserve a nice separation between look and feature.

    The DataRow implicit style defined can use DataTriggers that are bound to properties defined on the Page/Window/UserControl ( RelativeSource FindAncestor ). These properties could enable/disable the alternate row coloring as well as configure its color. In this case, the Enabling property as well as the Coloring properties could be considered as features of the Page/Window/UserControl while the way to select them, display them and affect them on the DataGrid remain on the look side of things ( XAML-only ).

    Marc Laroche
    Software Developer
    Xceed Software Inc.


    I don’t suffer from insanity, I enjoy every minute of it. - Unknown
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.