I have a UserControl that has 1 xamDataGrid and 2 other UserControls in it. The 2 other UserControls just contain single xamDataGrids.
In each UserControls, I use something like this...in code behind:
DataTable dt = MyClass.Instance.Data();
xgrdSummary.DataSource = dt.DefaultView;
The 3rd grid (and sometimes 2nd grid) does not show any data on startup. Even when I step through the code, "dt" has valid data in it but the datagrid does not show the underlying data. Also, in MyClass, an event updates the data() property every few seconds but the data in 3rd grid is not refreshed automatically.
What am I doing wrong?
Hi Jay,
Thank you for your feedback. I am glad that you have managed to resolve your issue.
I have found the problem - the data is updating fine in all the datagrids - the problem was elsewhere in code.
Thanks.
I have looked at your application and it is working fine.
Does this work as Binding? this.dataGrid2.DataSource = dt.DefaultView;
If for some reason, at startup, if the data for UserControl 3 is not available, the datagrid will be empty. But if at a later time, if dt gets refreshed by an event, would the datagrid refresh automatically and show the data?
P.S. Note that my classes are singleton classes so another class can update the variable dt.
Thank you for your reply. The attaching of the zip has failed. I attached it once again to my previous reply.
How do I download the zip file you created?