Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
932
How to force Xam Grid to redraw its row when a cell's value is updated?
posted

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

Parents
  • 1230
    posted

    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.

Reply Children
No Data