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
415
Refreshing a template column
posted

I've got a grid with:

  1. A "Code" TextColumn (read-only)
  2. A "Value" TextColumn (editable)
  3. A TemplateColumn containing a button
  4. A TemplateColumn containing an image and a textblock (in a horizontal StackPanel)

When the button is clicked the "Value" is added to a collection keyed by the "Code" - the value is incremented if necessary.

What I want to do is to conditionally show the image in the last template column based on whether the "Code" is in the collection and to display the accumulated "Value" in the textblock.

I've added converters against the image's visibility property and the textblock's text property and these work when the list is loaded. However when I enter a value and click the button I can't get the last template column to refresh. Is there an easy way to do this?

Hopefully this made sense. If not let me know!

Thanks.