I know this has been asked already but I have done almost everything what is suggested by developers.
Without seeing said object list, I believe you should be binding to the DataGrid's ItemsSource
property, not its DataContext
.
(This assumes that the element [UserControl, etc.] that contains the DataGrid has its DataContext bound to an object that contains the list
collection. The DataGrid is derived from ItemsControl
, which relies on its ItemsSource
property to define the collection it binds its rows to. Hence, if list
isn't a property of an object bound to your control's DataContext, you might need to set both DataContext={Binding list}
and ItemsSource={Binding list}
on the DataGrid...)