Forum
17:11
26/02/2014
$(function () {
$("#csv").jqGrid({
datatype : 'xml',
url: "data.php?sd=<?php echo($startdate) ?>&ed=<?php echo($enddate) ?>&agents=<?php echo($csragents) ?>",
mtype: "GET",
colNames: ["Agent", "Inbound Calls", "Inbound Talk Time", "Outbound Calls", "Outbound Talk Time", "Total Talk Time", "Session Time", "Pause Time", "Wait Time", "StartDate", "EndDate"],
colModel: [
{ name: "Agent", width: 100 },
{ name: "callsreceived", width: 100, align: "right" },
{ name: "callsreceivedtime", width: 100, align: "right" },
{ name: "outboundcalls", width: 100, align: "right" },
{ name: "outboundcalltime", width: 100, align: "right" },
{ name: "totaltalktime", width: 100, align: "right" },
{ name: "sessiontime", width: 100, align: "right" },
{ name: "pausetime", width: 100, align: "right" },
{ name: "waittime", width: 100, align: "right" },
{ name: "startdate", width: 100, align: "right", editrules: {edithidden:true}, hidden:true},
{ name: "enddate", width: 100, align: "right", editrules: {edithidden:true}, hidden:true},
],
pager: "#csvpager",
rowNum: 50,
rowList: [50, 100, 200],
sortname: "Agent",
sortorder: "desc",
viewrecords: true,
gridview: true,
autoencode: true,
autowidth: true,
height: "100%",
multiselect: false,
subGrid : true,
subGridUrl: 'subdata.php?q=2',
subGridModel: [{ name : ['Date','Queue','Number','Event','Event Time'],
width : [200,200,200,200,200],
params : ['Agent','startdate','enddate']}
],
caption: "CSR Queue"
});
});
The subgrid is getting the data .. watching the network tab in chrome dev tools
<?xml version='1.0' encoding='utf-8'?>
<rows>
<row>
<cell><![CDATA[2014-01-22 12:58:38]]></cell>
<cell>6</cell><cell></cell>
<cell><![CDATA[PAUSE]]></cell>
<cell>00:00:00</cell>
</row>
<row>
<cell><![CDATA[2014-01-22 12:59:25]]></cell>
<cell>6</cell>
<cell></cell>
<cell><![CDATA[UNPAUSE]]></cell>
<cell>00:00:00</cell>
</row>
</rows>
Can anyone tell me what I'm doing wrong its driving me a bit nutty.
11:35
Moderators
30/10/2007
Hello,
Please look at your subgrid configuration. See our examples and note that you use xml which (if I remember) should set too.
Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
44 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66