Got another tough issue that we're seeing in our Silverlight app.
Our xamwebgrid is bound to an observable collection data source, with multiple template columns for display. The itemtemplate and edittemplates are used, text blocks for item and text boxes for edit.
One of the features of our app is to show money values in different currencies. So we have logic to switch the currency to Euros from US$, and vice-versa. The conversion is done when the user switches, and then we update the values. A converter takes care of capturing the correct culture and a standard ToString("C0") makes the values show with the correct currency symbol.
Except in random cases. We've determined this is not a code issue on our part, it is basically a paint bug with the grid. What we see is that, somewhat randomly, the currency symbol does not change, and only on randomly selected rows. More importantly, if I scroll the offending records out of view, and scroll back, the symbol will display correctly! This is why I call it a paint bug.
What I was hoping to find was a method to call to force a refresh of the grid to ensure things are updated, but the closest I could find was UpdateLayout, which has no effect at all.
Any ideas?
Hi,
Well, calling InvalidateData() should do the trick. However, i'd like to try to narrow down why the grid isn't invalidating.
Do you have a sample that you could attach that reproduces the problem?
Thanks,
-SteveZ
That may be possible but it won't come easy, as this is on a complicated screen in an app that I can't share.
I'll try the invalidate to see if that gives me a fix, and then I'll try to put together a sample repro page. Thanks for the tip, wouldn't have known to try that one (sounds scary! <g> )
-Chuck