javascript - For jQgrid Subgrid,Service is not getting called through url attribute -
this code how trying include sub grid in jqgrid.
var receiveddata = <% =groupbyagentjsondata %> jquery("#" + '<%=reportjqgrid.clientid%>').jqgrid({ data: receiveddata, datatype: "local", height: 270, width: "1130", colnames: ['client name', 'return batchid', 'report sent date', 'report type', 'attested count', 'status'], colmodel: [ { name: 'name', index: 'name', width: 20, stype: 'text', sortable: true }, { name: 'report_sent_id', index: 'report_sent_id', width: 20, sortable: true }, { name: 'report_sent_date', index: 'report_sent_date', width: 20, sortable: true }, { name: 'report_type', index: 'report_type', width: 20, sortable: true }, { name: 'attestation_count', index: 'attestation_count', width: 20, sortable: true }, { name: 'standard_value', index: 'standard_value', width: 20, sortable: true } ], rownum: 10, rowlist: [10, 20, 30], pager: '#pager', sortname: 'id', viewrecords: true, sortorder: "desc", multiselect: false, subgrid: true, emptyrecords: "record not available", rowlist: [5, 10, 20, 30], caption: "billing report", subgridrowexpanded: function (subgrid_id, row_id) { // pass 2 parameters // subgrid_id id of div tag created whitin table data // id of elemenet combination of "sg_" + id of row // row_id id of row // if wan pass additinal parameters url can use // method getrowdata(row_id) - returns associative array in type name-value // here can easy construct flowing 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>"); var returnbatchid = $("#" + '<%=reportjqgrid.clientid%>').jqgrid('getcell', row_id, 'report_sent_id'); alert("before subgrid"); jquery("#" + subgrid_table_id).jqgrid({ url: 'frmbillingreport.aspx/getsubgrid', datatype: "json", mtype: 'get', colnames: ['client id', 'unique id', 'status','origin','date'], colmodel: [ { name: "client_id", index: "num", width: 70, key: true }, { name: "unique_id", index: "item", width: 80 }, { name: "attestation_status", index: "qty", width: 70, align: "right" }, { name: "origin_of_attestation", index: "unit", width: 70, align: "right" }, { name: "date_of_attestation", index: "total", width: 70, align: "right", sortable: false } ], rownum: 20, pager: pager_id, sortname: 'num', sortorder: "asc", height: '100%', }); }
subgrid url not calling respective service.i able call colname , colmodel attribute. right way call service?
Comments
Post a Comment