I have made a grid thats working fine and subgrids with it. The problem is that I want to send the table name (data of row) in my url to action method but i just have row_id and i dont know how to get data from it. I used the getRowData function but its not working. I dnt know where i am wrong. I've done something like
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("
");
var dataFromTheRow = jQuery('#grid').jqGrid('getRowData', row_id);
$("#" + subgrid_table_id).jqGrid({
url: "/MyApp/OrdersDetailsSubgridData?tablename=" + dataFromTheRow,
datatype: 'json',
mtype: 'GET',
colNames: ['Column Names'],
colModel: [
{ name: "COLUMN_NAME", index: "COLUMN_NAME", key: true }
],
rowNum: 20,
pager: pager_id,
jsonReader: {
root: "rows",
page: "page",
total: "total",
records: "records",
repeatitems: false,
Id: "0"
},
sortorder: "asc",
viewrecords: true,
autowidth: true,
multiselect: false
});