The processing function of flexigrid uses closures to pass this object.
In many cases, the process function needs to obtain the this object and then call some methods.
The following is an example:
config : function (groupName, description, deviceNumber, del) { var ob = this; $("#groups").flexigrid({ dataType: 'json', width: 870, height: 300, colModel : [{ display: groupName, name: 'groupName', width: 200, sortable: true, align: 'left', process: (function (ob, hdl) {return function (celDiv, id) { hdl(ob, celDiv, id);}; }(ob, ob.editName))},{ display: description, name: 'description', width: 469, sortable: true, align: 'left', process: (function (ob, hdl) {return function (celDiv, id) { hdl(ob, celDiv, id);}; }(ob, ob.editDescription))},{ display: deviceNumber, name: 'deviceNumber', width: 110, sortable: true, align: 'left'},{ display: del, name: 'del', width: 25, sortable: true, align: 'left', process: (function (ob, hdl) {return function (celDiv, id) { hdl(ob, celDiv, id);}; }(ob, ob.remove))} ]} ); $.ajaxSetup({ cache: false });},
In this way, the problem of not passing additional parameters can be solved perfectly.