Hi,
I am using the ObservableCollection as the datasource for the grid.
In a button click i open another window and changing the data. and sending the message to the main window to refresh the grid.
but, setting the data source to null and setting the source again is not refreshing.
How can i refresh the grid to get the updated data?
Did you ever find a solution to this problem? I am having the EXACT same problem.
Linda
I agree that as wpf developper, implementing INotifyPropertyChanged should not be a problem.
Yet, I do not find a way to force the FieldLayoutInitializing event to rebuild the field layout when the DataSource is changing.
The data are updated but neither do the associated templates.
Olivier
Hello,
I do not seem to share the same opinion as you. Implementing INotifyPropertyChanged is not difficult at all - pretty straightforward and helpful not only in the XamDataGrid but in any other scenario involving properties.
Implementing this interface and leaving the rest of the work to the wpf framework seems to me much more safer than calling refresh methods and being on the lookout where things might go wrong.
What bothers me with the xamlDG is that to get this to work with the WPF grid all you do is call item.refresh. So what the heck is IF xaml grid making this so abstract and difficult?
Instead of a empty string, is it appropriate using a string showing that there is no change in the property like "No Change", "N/A" etc.
Will this work in your scenario?