This example demonstrates how to edit a grid cell in batch mode and update the data source on a callback.
Follow the steps below to configure a single cell's edit functionality:
- Place GridView with the enabled Batch Edit mode on the page.
- Handle the BatchEditEndEditing event. In the handler, collect the information about the edited row and send the information to the server side. Use the jQuery.ajax method for this.
- In the controller action, update the data source with the new data and return the result string (OK or the error message).
- Use the success handler to return the focus to the last edited cell if something went wrong. For example, a server-side validation error.
- HomeController.cs (VB: HomeController.vb)
- Model.cs (VB: Model.vb)
- GridViewPartial.cshtml
- Index.cshtml
(you will be redirected to DevExpress.com to submit your response)