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 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.
Let me put my problem in short .
the sample code that you have given which implements the customRule. the class has Evaluate condition which gets called when datasource is attached to grid. now in my case after datasource is attached later on a buttonclick event my column starts updating with real time data. now the evaluategrid methoad of my custom rule should be called. even though my dataobject implements inotifyproperty changed it is not notifying the custom rules evaluateCondition method.
there is something that is missing.
in your case it is simple as you are applying style on loading of grid. my style should be applied at real time after cell value changes.
please let me know how do i do this.
can you update the above sample for real time data. actually i am creating styles also dynamically depending on user settings loaded from server.Also i am getting the colum name from settings to which this rule needs to be applied some thing like thsi
<DictUpDownColourRuleConfig type="map">
<
i id="IsAvailable.UpDownColourRule" type=".Sales.Controls.Models.UpDownColourRuleConfig">
RuleAppliedOn value="Column"/>
ColumnName value="Marks"/>
RuleName value="Marks.UpDownColourRule"/>
RuleUpForeColor value="000000"/>
RuleUPBackColor value="00FF00"/>
RuleDownForeColor value="000000"/>
RuleDownBackColor value="FF0000"/>
</
i>
DictUpDownColourRuleConfig>
yes it does
Does your data object implement INotifyPropertyChanged?