I can\'t get editData or onclickSubmit to do what I need.
I want the grid to follow the added or edited row after update. So, I need to post some additional info so
You can either define properties of editData using functions
editData: {
sortColumnName: function () { return "ProductName"; },
sortOrder: function () { return "asc"; },
rowNum: function () { return 15; }
}
or use callback onclickSubmit to extend the data posted to the server
onclickSubmit: function (options, postData) {
return {
sortColumnName: "ProductName",
sortOrder: "asc",
rowNum: 15
};
}
or use serializeEditData callback
serializeEditData: function (postData) {
return $.extend(true, {}, postData, {
sortColumnName: "ProductName",
sortOrder: "asc",
rowNum: 15
});
}
Every from above ways do the same. You can choose one way which you find the mostly convenient for your requirements.