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
180
Dynamic Value Trigger
posted

Hello all,

I have a xamDataGrid with N number of objects.  Any one of my objects can be set as the "Base Line" object which is a property in my ViewModel. In a DataGrid column I would like for any values that are not equal to the Base Line's value, to change the color.  This will allow the user to see all changes from the base line very easily.  Is there DataTrigger support that can handle this dynamic problem?

 

Thanks,

 

KP

Parents
  • 30945
    Verified Answer
    Offline posted

    Hello Kevin,

     

    I have been looking into your last reply and if I understand correctly you want to avoid casting the items in values array of the Convert method of the Converter to a particular object type. If so, I can suggest your objects in the model to implement IComparable interface an in the Convert method of the Converter class you can cast the objects in the values array to IComparable and call CompareTo method in which you can implement the logic that will compare your objects. By doing so the Converter does not need to know anything about the model, it needs to know whether the objects implement IComparable interface. I am attaching the sample application that I sent you with my previous reply in order to implement the above approach.

     

    If you need any further assistance please do not hesitate to ask.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

    DynamicCVPBackgroundDepOnProperty.zip
Reply Children
No Data