Hi,
I am setting background and foreground color on basis of content using DataRecordCellArea style.
i tried it using DataTrgiggers & as well as using converter ( custom value converter ) but it some time work fine, some time not.
for your information i am also sorting record on basis of time, for this i am calling RefreshSortPosition on InitializeRecord event.
one thing i had observed is when i stop sorting. foreground and background color seems to correct, but issue occur when i start sorting as well.
Is style have any connection with record position ?
please help !!
Thanks,
Hello Narender,
I am attaching a sample demonstrating how to set foreground and background colors using both converters and data triggers. It is best to use data triggers when you set a color based on an exact value. Converters are better when you need to set a color based on a condition (for example greater than a specific value). Also the sorting seems to be working when clicking on the columns' headers. If your data source's data is constantly changing please make sure you implement correctly the INotifyPropertyChanged interface on your data item's type.
Please let me know if I can be of any further assistance.
Sincerely,Radko KolevSenior Software Developer
Thanks Radko, yes i correctly implemented INotifyPropertyChanged, but actually we are sorting record ( i.e on intialize_record event we are basically calling ResfreshRecordPosition ), what i have noticed that when i stop calling RefreshSortPosition function it work's fine.
so is there any relation bewteen the two ?
thanks,