Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have made a grid thats working sine 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 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


});
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900