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
1465
Update datasource
posted

Hello.

I have a grid and a button on a form. The user enters quatities in the grid and clicks the button to advance the screen.

Unless the user manually moves focus off of the cell that was just edited the underlying datasource is not upated. So if the user changes a quantity and clicks the buttons, the underlying datasource is not updated.

How can I make the datasource update when the focus leaves the cell/grid?

Thanks in advance,

Mike

Parents
No Data
Reply
  • 469350
    Offline posted

    The grid commits the changes to the underlying data source when it loses focus. So if you click a toolbar button or some other button that does not take focus away from the grid, you have to force an update.

    You can call the Update method on the grid's ActiveRow if you know there is only one row with pending changes. Or you can update the entire grid by calling grid.UpdateData().

Children
No Data