Hello, I am using grid's inline editing mode and I have an external button that modifies some information on the rows. My problem is that after the information has been modified, if I click Edit and then Cancel, the row goes into its original state and I cannot find a way to persist this data. Does anyone know what could be wrong? Here is my code:
This is what my button does:
01.function validateAll() {02. var grid = $("#Grid").data().kendoGrid;03. var orders = grid.dataSource.view();04. 05. for (var i = 0; i < orders.length; ++i) {06. var order = orders[i];07. if (order.Status === 'Open') {08. order.Status = 'Valid'09. }10. }11. grid.refresh();12. }And this is the code of the grid:
01.@Code02. Dim grid = Html.Kendo().Grid(Of Model)()03. With grid04. .Name("Grid")05. .Editable(Sub(edit) edit.Mode(GridEditMode.InLine))06. .Columns(Sub(columns)07. columns.Command(Sub(command)08. command.Edit()09. End Sub)10. columns.Bound(Function(c) c.Order)11. columns.Bound(Function(c) c.Status)12. End Sub)13. .DataSource(Sub(dataSource)14. Dim dataSourceBuilder = dataSource.Ajax()15. With dataSourceBuilder16. .Read("GetGridData", "Order")17. .Update("DummySave", "Order")18. .Batch(True)19. .ServerOperation(False)20. .Model(Sub(model)21. model.Id(Function(row) row.Order)22. End Sub)23. End With24. End Sub)25. End With26.End Code