Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
695
DataGrid not refreshing
posted

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();