I have a JQgrid that works perfectly fine, it has a subgrid, that works OK, but for some strange reason only the first row of subgrid won't populate the data received from server, although I can see the data returned in firebug. All other subgrid rows will populate fine.
below is the code for grid and subgrid. (I'm using 4.1.1 version with jquery 1.5.2)
<div id="pager11"></div>
</body>
</html>
<script type="text/javascript">
jQuery("#list11").jqGrid({
url:'server.php?q=1',
datatype: "xml",
height: 200,
width: 800,
colNames:['Details','Nature', 'Mode', 'Date','Created','By','Creator'],
colModel:[
{name:'details',index:'details', width:350},
{name:'nature',index:'nature', width:40},
{name:'mode',index:'mode', width:70},
{name:'interaction_date',index:'interaction_date', width:80, align:"right"},
{name:'created_on',index:'created_on', width:80, align:"right"},
{name:'created_by',index:'created_by', width:25,align:"right"},
{name:'creator',index:'creator', width:70, sortable:false}
],
rowNum:10,
rowList:[10,20,30],
pager: '#pager11',
sortname: 'id_interaction',
viewrecords: true,
sortorder: "desc",
multiselect: false,
subGrid : true,
subGridUrl: 'subgrid.php?q=2',
subGridModel: [{ name : ['Details'],
width : [760] }
],
caption: "Subgrid Example"
});
jQuery("#list11")开发者_C百科.jqGrid('navGrid','#pager11',{add:false,edit:false,del:false,search:false});
jQuery("#list11").jqGrid('filterToolbar',{stringResult: true,searchOnEnter : false});
</script>
XML response received that won't show
<?xml version='1.0' encoding='utf-8'?>
<rows><row><cell><![CDATA[We will display all the details in this section.]]></cell></row></rows>
XML response that works
<?xml version='1.0' encoding='utf-8'?>
<rows><row><cell><![CDATA[But still we need to work harder.]]></cell></row></rows>
Any clues?
精彩评论