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
1735
xamPropertyGrid does not update collection properties updated elsewhere
posted

Hi

The attached sample shows an issue I have with the xamPropertyGrid: If the property grid shows a collection property expanded and the collection is updated elsewhere in my application, the property grid does not refresh the UI with the new items. To get the new collection items displayed in the xamPropertyGrid, the collection property must be collapsed/expanded manually in the grid.

The property grid in the attached sample show an object with two properties; a simple string and a collection of data items. The object implement INotifyProperyChanged.

The simple string property may be edited outside of the property grid using the text box below the grid. As expected, the property value in the grid is updated when the text box content changes.

To add a new item to the collection of data items, use the 'Add to Collection' button. If this button is clicked while the collection is expanded in the property grid, no new item is added to the grid. To see the new item in the grid, the collection must be collapsed and then expanded again.

To replace the full collection of data items, use the 'Replace Collection' button. This has the same effect as adding items, i.e. that the property grid is not updated until manually collapsed/expanded.

The third button in the sample, 'Edit values of first item in collection', is used to edit the individual properties of the first item in the data collection. If this sub-item is expanded in the property grid while clicking the button, the property grid actually updates with the new values. This part therefore works as expected.

How can I make the property grid refresh properly when modifying my collections?

Regards,
Leif

PropertyGridCollectionUpdates.zip
  • 1735
    Verified Answer
    posted

    This issue was fixed in the December 2015 Service Release

  • 2151
    Offline posted

    Hello leifop,

    Thank you for your post. I have logged this behavior with our developers in our tracking system, with an issue ID of 209527.  I have also created a support ticket on your behalf with number CAS-166570-X7X7D1 in order to link the development issue to it so that you are automatically updated when a Service Release containing your fix is available for download.

    Sincerely,

    Radko Kolev

    Infragistics Inc.

    www.infragistics.com/support