Wpf datagrid row not updating when binded collection updated?
Posted
by RAJ K
on Stack Overflow
See other posts from Stack Overflow
or by RAJ K
Published on 2010-05-31T10:31:29Z
Indexed on
2010/05/31
10:32 UTC
Read the original article
Hit count: 744
I have product class
class Products
{
public int ProductID { get; set; }
public int Quantity { get; set; }
public string Description { get; set; }
public decimal Price { get; set; }
public decimal SubTotal { get; set; }
}
public List<Products> ProductsList = new List<Products>();
I have binded this "ProductList" to wpf datagrid. This datagrid shows item already in collection (before DataGrid.DataContext applied) but not showing new item added.
I am using List<> instead of ObservableCollection<> because I want to update items if user changes quantity. I don't know how to do that using ObservableCollection<>.
Some code will help
thanks
© Stack Overflow or respective owner