I think that serializeCellData would be useful to me, but I’m not sure how it works and where it is called in the order of events. Does serializeCellData(postdata) define the other event parameters rowid, cellname, value, iRow, and iCol? Can it be used to add postdata information to, for instance, afterSaveCell so that it now takes more than 5 arguments?
In my code, I’m making local modifications to data using cell editing.
The serializeCellData event can be used to customize the data which will be send to the server in case of cell submitting. It will be used only if cellsubmit option are set to ‘remote’ of course. For example, if we save the cell named
'mycell'(the cell from the column ‘mycell’) the object{id: theRowId, mycell: cellValue}will be used as thepostdataparameter of serializeCellData event. If you want you can analyse the input and return from serializeCellData the object like{rowid: theRowId, cellname:mycell, value: cellvalue}. If you need to have access to additional information likeiRowandiColyou can implement additionally beforeSubmitCell, save the values of parameters which you need in a variable in the external scope which is visible in both beforeSubmitCell and serializeCellData. Then you can see the values saved by beforeSubmitCell inside of serializeCellData and append the object returned by serializeCellData.What I described above is only some remrks how the serializeCellData event can be used. If you return the string from your serializeCellData event handler instead on an obect then the string will be send by
jQuery.ajaxexactly like it be. So if you need to send JSON data to the server you can do the followingSo the serializeCellData event can be used in different cases and gives you really full control which data exactly will be send to the server.