I need to compare a cell value with its new value and accordingly change its background to green if cell new value is higher else to red if cells new value is smaller. i also want a upward/ downward arrow besides it.
can you help me with this requirement. should i use conditional formatting or valueconvertor?
how to go about it?
There is nothing in the XamGrid that is going to remember your old value, so you would need to persist that value on your data object and then write a custom conditional formatting rule and make your evaluation.
You could use the IconConditionalFormattingRule as your base class for your custom rule because that will allow you to put icons into the cells.
... and then write a custom conditional formatting rule and make your evaluation...
Is there an example for this?
Does your data object implement INotifyPropertyChanged?
There is no reply to my query yet.
This is a very basic requirement for any trading application.Even after creating the custom rule it does not get appied to real time data change...even after setting the
MyRule.ShouldRefreshOnDataChange =
true;
i am waiting for your reply since past four days.
Testing out your claim, I have a sample that updates the field and processes the information. At this point, if you still can't resolve your issue, I am going to need a working test sample demonstrating what you are seeing.
If your data object implements INotifyPropertyChanged then we can see the object's values changing (assuming the properties raised the event)
IF you are changing the collection , then the collection should implement INotifyCollectionChanged (like observable collection).
Darrel i am unable to run your sample code.
i have 10.3V XAMGrid for silverlight installed.
Infragistics.Silverlight.dll
Infragistics.Silverlight.XamWebGrid.dll
the trial version does not contain these binaries?
In 10.3 those dlls would be named InfragisticsSL4.v10.3 and InfragisticsSL4.Controls.Grids.XamGrid.v10.3