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
1865
Urgent: Simple Binding xamDataGrid to OvervableCollection?
posted

I usually use a method in my class ...

public DataTable GetData() and in UserControl I have xgrd.DataSource = MyClass.GetData().DefaultView;

If I change my method to:

public ObervableCollection<MyDataClass> GetData(), and in my UserControl if I have xgrd.DataSource = MyClass.GetData();

shouldn't it just work - what am I missing? The grid is displaying the small markers along each row but no field names or data.

Thanks.