When the UltraWinGrid is bound to a List<T> and new item is added to the list, you need to call the UltraGrid.Rows.Refresh method so that the newly added object shows up as a row in the grid. So, if we have this:
List<Product> products = new List<Product>();ultraGrid1.DataSource = products;
We will see columns representing all of the public properties in the grid, however no rows will exist because we have not added any objects to the list yet. If we add a button to the form, handle its click event and then do this:
Product p = new Product();products.Add(p);
We still won't see a new row in the grid. We have to call the Rows.Refresh method to cause the new row to appear:
this.ultraGrid1.Rows.Refresh(RefreshRow.ReloadData):
The reason for this is because the List<T> does not raise change notifications like the BindingList<T> does. When using a BindingList<T> it is not necessary to call Rows.Refresh() to display the newly added object in the grid.
Sincerely,CharlieSenior Developer Support EngineerMCTS
Thanks Charlie. I was updating my software today and I switched alot of my old collection classes to List (of T) and noticed this problem. Using BindingList(of T) has it working :)
I'm glad that I could be of help. Please let me know if you have any more questions.