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
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
The tricky part in my case is there is no common comparison (ie. 1 property). Each cell needs to evaluate itself independently based on the same field in the base object.
I do realize however that I'm going beyond the help of the control itself. You gave me great information here, greatly appreciated.