stephenl
Newbie
Posts: 30
|
|
« on: June 02, 2019, 04:24:31 AM » |
|
Hello
The code below returns the JSON data for the 2nd level of a nested grid using url:'get_notes.php', however the respective fields on the grid are not being populated. (The subgrid header is showing OK)
Where am I going wrong ?
<script type="text/javascript"> var conf = { options:{ fitColumns:true, columns:[[ {field:'Customer',title:'Acct',width:10}, {field:'Cus_Name',title:'Name',width:100}, ]], }, subgrid:{ options:{ fitColumns:true, singleSelect:true, url:'get_docs.php', foreignField:'Customer', columns:[[ {field:'Doc',title:'Doc',width:6}, {field:'Doc_Type',title:'T',width:3,align:'center'}, {field:'Doc_Date',title:'Doc Date',width:10,align:'center'}, {field:'Due',title:'Due Date',width:10,align:'center'}, ]], }, subgrid:{ options:{ fitColumns:true, singleSelect:true, url:'get_notes.php', foreignField:'Doc', columns:[[ {field:'Doc',title:'Doc',width:20}, {field:'Notedate',title:'Date',width:30}, {field:'Note',title:'Note',width:200}, ]] } } } }; $(function(){ $('#dg').datagrid({ title:'Accounts', width:850, height:450 }).datagrid('subgrid', conf); }); </script>
Thank you
|