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,
I have created a sample application that demonstrates an approach for implementing the functionality that you are looking for. The approach uses a Style with an DataTrigger for the CellValuePresenter. The DataTrigger’s Binding property is set to a MultiBindig object which contains two Binding objects. The first is Binding to the BaseLine propery and the second is to Record.DataItem of the CellValuePresenter. In the Convert method of MultiValueConverter is calculated whether the value of the Record.DataItem is equal to the BaseLine.
If you need any further assistance on this please do not hesitate to ask me.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hello Krasimir,
Thanks for your detailed response. That solution seems to work very well, but it will break my MVVM design. Do you know of a way to do the same and keep the converter from knowing anything about the model?
I'm using MVVM light.
Kevin