I am binding the xamdatagrid to the defaultView of my datatable via code. Then on the FieldLayoutInitialized I am applying grouping on a particular column. At runtime I am repopulating my datatable. When I do so, the xamdatagrid clears the displayed rows and leaves only the headers. To get the datagrid to display the updated datatable i have to (see below). The probelm is that when i do so I loose the header section and grouping which wuold are being set up in the FieldLayoutInitialized event. Is there some other event which is raised the second time around?
code to repopulate grid.
.datasource = null;
.UpdateLayout();
.datasource = table.defaultview;
.updatelayout();
Try clearing the FieldLayouts collection as well, e.g.
.FieldLayouts.Clear();