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
Value does not refresh.
posted

I have a simple grid binded to a DataSource (List<MyItems>).  The DataSource items have a Status boolean property.  When double-clicking the record, I'd like to toggle the value of the Status field.  Here is the line from the code-behind in the MouseDoubleClick event of my grid where I toggle the value:

ViewModel.Model[MyGrid.ActiveRecord.Index].Status = !ViewModel.Model[MyGrid.ActiveRecord.Index].Status;

With this code, the value in my ViewModel is correctly toggled between true and false, but the grid doesn't reflect the changes.  If I scroll down to the bottom of the grid and come back to the record, the row is shown correctly.

How do can I keep the grid in synch with my ViewModel in that case?