There are two main issues here:
First: You can't use AutoGenerateColumns = "false"
without setting up columns. You'll need to map these through yourself, ie:
<DataGrid AutoGenerateColumns="false" ItemsSource="{Binding MyTable}" >
<DataGrid.Columns>
<DataGridTextColumn Header="Value" Binding="{Binding Value}"/>
</DataGrid.Columns>
</DataGrid>
Note that you can just set AutoGenerateColumns="true"
instead, which will give you one column per property in your class.
Second: You will need to make your class (class MyItem
) implement INotifyPropertyChanged
if you want to have changes made in code reflected in the UI.