For easy coding we would like to use the DataGridViews feature DataLoadMode="Asynchronous" binding directly to the query.
Using this we do not need to manually code async EF I/O, the application does not block and by Binding the windows IsEnabled to the grids IsDirty we can easily block user input on the busy window.
If we use an ObservableCollection the I/O happens outside of the grid and thus is not async.
grid.ItemsSource = ObservableCollection(qry)
Without using an ObservableCollection I cannot get adds and deletes working.
For instance using grid.ItemsSource.Remove(grid.SelectedItem) plus db.RemoveObjet() seems not to work.
Is there an example for this scenario somewhere?
Using this we do not need to manually code async EF I/O, the application does not block and by Binding the windows IsEnabled to the grids IsDirty we can easily block user input on the busy window.
If we use an ObservableCollection the I/O happens outside of the grid and thus is not async.
grid.ItemsSource = ObservableCollection(qry)
Without using an ObservableCollection I cannot get adds and deletes working.
For instance using grid.ItemsSource.Remove(grid.SelectedItem) plus db.RemoveObjet() seems not to work.
Is there an example for this scenario somewhere?