Reputation: 8254
I have the following window in my app:
The list is declared as : IList < Vendor > _editList; and the datagrid is populated via : dataGridVendors.ItemsSource = _editList;
The "New" button creates a new Vendor and adds the vendor the _editList. Vendor vendor = new Vendor(); _editList.Add(vendor);
Unfortunately.... the new vendor does not show up in the datagrid........any ideas on how to make the new item show up ??
Regards, Sebastian
Upvotes: 3
Views: 1375
Reputation: 4971
Use ObservableCollection:
IList<Vendor> _editList = new ObservableCollection<Vendor>();
The rest of your code should remain the same.
Upvotes: 9