After I've saved my items that are in the DataGrid to a database, I'd like it cleaned up. So I used it like this:
dg.Items.Clear();
But then this error appears:
Operation is not valid while ItemsSource is in use. Access and modify elements with ItemsControl.ItemsSource instead.
Is it being used or something? How do I fix this?