I\'m using MVVM for my project and I\'m trying to bind a table from my database with a DataGrid. But when I run my application datagrid is empty.
MainWindow.
You have an error in binding. Try this:
Code-behind:
private ObservableCollection _lecturers = new ObservableCollection(); public ObservableCollection Lecturers { get { return _lecturers; } set { _lecturers = value; } }
Here is simple example code (LecturerSimpleBinding.zip).