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
75
WebGrid & Ajax
posted

We have a regular WebGrid control (not WebDataGrid) which we've placed in a Microsoft UpdatePanel control to enable Ajax functionality.  Interestingly, after data is entered in a particualr cell, then a call is made using Ajax to the server side UpdateCell method which executes custom business logic against SQL and returns a status description that will update another field in the row.

The issue we're having is that if a user enters the data in the triggering cell and then immediately presses the AddNew button, the new row is added before the Ajax call has completed.   Unfortunately, when the Ajax call returns, the original line is updated with the status description, but the newly added line is deleted, even if they have already started filling in data.

Is there a way to make sure that the Ajax return call only updates the line that initated the call while still allowing the user to be typing in data on a new line?

Thanks in advance