Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
560
Refreshing the DataSource
posted

On a button's click, I update the list (adding rows and/or, deleting rows) that is binded to my Grid's DataSource.  The newly added or removed records won't show until I do:

MyGrid.DataSource = null;

 MyGrid.DataSource = (DataContext as MyViewModel).MyList;

Since I don't have access to  MyGrid from the ViewModel, this code has to be in the code-behind (Click event), which is fine (Refreshing is only a UI thing).  But I trigger my processing with an Interaction Trigger that is fired after the Click event.  Results: the click event's refresh the DataSource, then the processing is done and not shown in the Grid.

Why is my grid not automatically updated?

Is there a way that would allow me calling my refreshing code after the trigger has been executed?

I'm using the latest version.