Greetings,
I am doing something exactly like this. But ran into some problems with auto generating cols because the entire model is shown. First, I wanted to use the same model returned from the DBML (I am using LINQ to SQL).
What I ended up doing is adding all of the columns to the grid as Visible false (watch out for the 3.7 bug one col need to be vis true), then in my view model, I created custom views that a user can choose and just showed them. Of course, I had to pass a ref of the DataGrid to my VM, which is not good MVVM practice, but the xceed Cols are not part of the visualtree and you can not get the datacontext of the parent and bind to visible. Note: there is a post here on how to do this in code behind, and I tried, but I lost the binding if you change the visibility in the columnchooser.
Anyway.. here is a snippet.. NOTE: in another method I looped and set all cols to vis = false (again, except for one or crash)
private
void PMCustomView()
{
List<String> cols = new List<string>{
"BlahBlah",
"SomeColumn",
// set the cols
cols.ForEach(x => this.GridControl.Columns[x].Visible = true);
}
Anyway.. some food for thought.
Micah