Hi,
I am setting Forecolor of all cells in a row based on a particular cell, Grid is bound to an Ibinding list. To do so I have set below binding the cellvaluepresenter
<Setter Property="Foreground" Value="{Binding Path=DataItem, Converter={StaticResource _statusRowFormatter}}" />
This works fine when grid is loaded for the first time because converter is called for each cell which returns appropriate Forecolor but once all cells are created and displayed, any update in particular cell's value doesnot cause this converter to be called for any cell. So the forecolor is not updated.
How can I force grid to redraw itself (so that new forecolor can be applied) when the particular cell's value is changed?
Any help is appreicated.
Thanks,
Naveen
Hi Drdonna,
You solution of toggling Visibility property of the Record object works fine for me.
thanks so much, cheers!
Thanks for your reply. In my case IBindingList is updated so I dont get a CellChanged/Updated event notification and hence can not force the Redraw.
I am doing some cell data editing in the EditModeEnding event of the cell. When a value of one cell changes it can change the value of other cells. I want to change the color of the background of the other cells that changed to give the user a visual cue. I applied the new style to the cell but the display did not change. I used the Visibility property of the Record object to toggle it Collapsed and then Visible and the background changed.
Not as good as a Refresh method but it seemed to work. I am still experimenting but thought this may help.