I have an great sample of inline edit with jQGrid http://ok-soft-gmbh.com/jqGrid/TestSamle/Admin.htm There is two custom actions Edit and Delete.
I want to add one more custom inline Action, lets call it ToggleOnline. On this action i want to post all cells of the grid to the controller. Basically it will be kind of of edit action but it will set some default values to some columns.
The inline buttons was added like that:
{ name: 'act', index: 'act', width: 55, align: 'center', sortable: false, formatter: 'actions',
formatoptions: {
keys: true, // we want use [Enter] key to save the row and [Esc] to cancel editing.
delOptions: myDelOptions
}
}
than to add custom additional button i was using event loadComplete:
loadComplete: function(){
debugger;
var ids = jQuery("#Grid1").getDataIDs();
for(var i=0;i<ids.length;i++){
var cl = ids[i];
custom = "<input style='height:22px;width:20px;' type='button' value='E' onclick=jQuery('#Grid1').editRow(" + cl + "); />";
jQuery("#Grid1").setRowData(ids[i], { act: custom })
}
}
but the custom button does not appearing at all. And also i need somehow to post row data and also i need to specify custom action name(oper) to handle this action on server.