Datagrid.Items.Refresh does not work. Which work around could I use?

Sep 15, 2010 at 5:22 PM

I have a datagrid displaying data from an XML file, used as static resource, via XPath. I let my users add, change and delete. There are no problems with change, but for add and delete, I would like to show changes made to the file, to show the updated data, but no luck so far!

I know my XML is properly updated. here is what I did so far:

        Dim lst As ICollectionView = CollectionViewSource.GetDefaultView(StorageSettings.Items)

Is there some specific properties to set for the datagrid to be properly updated?

Thanks for your help,

Sep 16, 2010 at 9:36 AM

I finally found a way to make it work, I'll post it here in case someone else look for the same thing than I did:

 Dim WholeDocument As XmlDataProvider = CType(StorageSettings.FindResource("MsgSettings"), XmlDataProvider)        

That is, I refresh the document rather than the grid.