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
290
Problem: XamDataGrid not updating property of model.
posted

Hi,

I am using MVVM to bind records to XamDataGrid.

It works fine for all but ONE case. When I make changes in the editable fields and save the changes to Database, it always loses the last change that I have made!

That means, grid is updating the property of underlying model ONLY when I click any other cell within the grid. If I make subsequent changes and then click on save button (outside the grid), then i loose the change made in the last cell.

Please help!!

  • 27093
    Suggested Answer
    posted

    Hello,

     

    I have been looking into your requirement and usually the XamDataGrid’s data source is update when the XamEditors exit EditMode, which also ends when you jump to another cell. This is why I assume that you have updated your data source on closing the application before the EditMode has ended. In order to ensure this has occurred you can call:

     

    xamDataGrid1.ExecuteCommand(DataPresenterCommands.EndEditModeAndAcceptChanges);

     

    right before you update your data source and close the application.

     

    Please let me know if this solves your issue ,or I have misunderstood you in any way.