Hi,
I bind a List<T> to the grid and get the items displayed properly. When I want to add a new item into the list of items, I do that from the code - so, a user presses 'Add' button, and in the code I actually add an instance of type T into the list. However, the grid does not get updated with that new row. This is the code I use to bind:
List<T> myList = whatever;
GridInstance.DataSource = myList;
When I add a new item:
myList.Add(new T());
If I check GridInstance.DataSource right after I add an instance into the list, then I can see that the DataSource refers to the updated list, but the UI stays the same...
What should I do to update the UI in this case? Thanks!
I bind a List<T> to the grid and get the items displayed properly. When I want to add a new item into the list of items, I do that from the code - so, a user presses 'Add' button, and in the code I actually add an instance of type T into the list. However, the grid does not get updated with that new row. This is the code I use to bind:
List<T> myList = whatever;
GridInstance.DataSource = myList;
When I add a new item:
myList.Add(new T());
If I check GridInstance.DataSource right after I add an instance into the list, then I can see that the DataSource refers to the updated list, but the UI stays the same...
What should I do to update the UI in this case? Thanks!