I am getting an error trying to change my column collection after it has been previously loaded.
I am using as much of an MVVM approach as I can, to work around some of the gridview properties that aren't DependencyProperties i had to get a little creative. Everything was working fine, but it seems as if something in the last release(2009.3.1208.35) is causing an error.
I have a property in my ViewModel that is a GridViewColumnCollection. A multibinding converter is used to get the Columns property of the Grid and set it into the ViewModel( which is the Datacontext for the Grid)
My Grid is declared as such:
Here's the Xaml for the column binding converter:Here's ColumnConverter:
The LoadListToolColumns Method reads through saved column data and creates GridViewDataColumns to add to the ColumnList Object(which since the ColumnList and the GridView.Columns are the same object it will update the UI when the ColumnList is changed).
This was all working fine, and still does work fine the first time it runs, but if I call LoadListToolColumns to try to load a different set of columns( after doing a ColumnList.Clear() ). Then I get an error, it works without error using version 2009.3.1103.35.
This error is thrown after all my code has executed successfully: