What's the best way to dynamically set the background of a cell based on a value from another cell (same row).?
Here are some details:
I have a class like this:
public class MyClass{
...
public string EditableValue1;
public bool EditableValue1_Valid; // not displayed on grid
public bool Validate(){...}
}
and I want the user to be able to edit some fields (EditableValuex) , and after editing the Validate() method will verify the values and set EditableValue1_Valid that will trigger the change in background color (Style) of the edited cell.
Any ideas ?
finally had time to get back to this project
tried your solution and it worked.
thank you.
A
Hello,
I suppose you can use a DataTrigger to achieve this:
Using DataTrigger, you should have an expression like this:
<DataTrigger Binding="{Binding Path=Cells[3].Value}" Value="True">
<Setter .../>
</DataTrigger>
More about this you can see on the thread below:
http://forums.infragistics.com/forums/p/25409/93305.aspx#93305
Hope this helps,
Alex.