I have added a button to each row of the subgrid of a jqGrid. I just followed the documentation of inline_editing for this.
I want to call the server side code on click of the button. But when I see the firebug it shows no request been made (not showing any url request) on click of the button.
Below is my code,
subGridRowExpanded: function (subgrid_id, row_id) {
var subgrid_table_id, pager_id;
subgrid_table_id = subgrid_id + "_t";
pager_id = "p_" + subgrid_table_id;
$("#" + subgrid_id)
.html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + pager_id + "' class='scroll'></div>");
$mysubgrid = jQuery("#" + subgrid_table_id);
$mysubgrid.jqGrid({
url: "serversub.php",
datatype: "json",
colNames: ['Product Id', 'Product Name', 'status', ''],
width: 700,
colModel: [{
name: 'productid',
index: 'productid',
width: 55
}, {
name: 'productname',
index: 'productname',
width: 90
}, {
name: 'status',
index: 'status',
width: 80,
search: false
}, {
name: 'link',
index: 'link',
width: 80,
search: false
}],
rowNum: 20,
sortname: 'num',
sortorder: "asc",
gridComplete: function () {
var ids = $mysubgrid.jqGrid('getDataIDs');
for (var i = 0; i < ids.length; i++) {
var cl = ids[i];
se = "<input style='height:22px;width:20px;'
type='button' value='Update' onclick=\"$mysubgrid.saveRow('" + cl + "');\" />";
$mysubgrid.jqGrid('setRowData', ids[i], {
link: se
});
}
},
editurl: "saveserversub.php"
});
Am I missing something here?
Thanks