I have a datagrid that is bound to a List in the view model. The grid\'s contents don\'t update until I click on the row header. Clicking in various cells doesn\'t affect it
If you want you grid to update the moment you change the IEnumerable list it is bound to, make it a type of list that implements INotifyCollectionChanged. A built in data type that has this is the ObservableCollection (also here). So if you make your property look like this:
public ObservableCollection TransactionDetailList
{
get { return this._transactionDetailList; }
set
{
this._transactionDetailList = value;
RaisePropertyChanged("TransactionDetailList");
}
}
your grid will automatically pick up any items you add or remove from the list.
Effectively what you are doing here is notifying when the list has changed (i.e. the list reference), but you are not notifying when the contents of the list have changed.