I have a
The main problem was with the binding. One shall not bind the
DataContext of a
DataGrid to a
DataTable. The better way is to bind its
ItemsSource to the
DataTable. Although the result would appear the same.
Secondly, abiding to the MVVM pattern is sometimes really painful and seems unnecessarily complicated. It seems there is no harm in doing some works programmatically.
And finally, this great answer helped me a lot. I refer the future readers with the same issues to that.