I have an edit button that brings the current row into an editor. The user can then hit save and return to the screen with the grid. My problem is I cannot get the grid to refresh.
I have tried the following:
AboutUsGrid.DataSource = null
;
AboutUsGrid.DataSource =
App.da.GetDataTable("SELECT * FROM AboutUs ORDER BY AboutUsID", "AboutUs").DefaultView;
What is the secret?
Linda
I noticed your post from last year wasn't answered. I apologize. We received a huge influx of posts last year. We are going through making sure all posts are answered.
If the XamDataGrid is bound to the DefaultView property of the DataTable, then changes made to the data will result in an automatic update in the data grid. DataView implements IBindingList which notifies when changes are made.
The IBindingList interface includes a ListChanged event which the XamDataGrid listens to. On the ListChangedEventArgs passed into the event there is a property called ListChangedType which is an enumeration of type ListChangedType. This property will be set to ListChangedType.ItemChanged if the contents of an item (i.e. record) has changed.
Were you able to resolve this issue? If not, can you verify that the underlying data source is being changed?