I was trying to set the value of the unbound field in xamdatagrid. The value of field3 = field1 + field2.
Also I wanted to attach style to it which would change the foreground of the unbound field (field3) to red for negative values and black for +ve values
Is it possible to do this in xaml or I have to write code in xaml and cs both?
Thanks,
Harshad
Harshad,
You would need a IValueConverter to handle the change of foreground color. For more information on how to do that, you can see in this forum thread: http://community.infragistics.com/forums/p/20644/80133.aspx#80133
Regarding the UnboundField, there is a sample for this in the XamFeatureBrowser - Using UnboundFields.
Hope this helps.
Hello Alex, I am also looking for the same but my 3rd field (unbound) should be calculated in the XAML.
But the XamFeatureBrowser shows a way using code behind. Is there anyway we can accomplish this
using CellValuePresenter? Please let me know your thoughts!