graveytrain
|
|
« Reply #4 on: September 06, 2014, 07:49:32 AM » |
|
So I use detail formatter to place a div, and I use expand row to call and get my data to fill the row. but what I discovered if I put an alert in the onExpandRow is that the row index would start back at 0 when scrollview was in play. and it caused me some headaches. finally I added a unique ID in my data which was a good work around but here is the offending code
detailFormatter: function(index, data){ return '<div style="padding:2px"><table id="tt-' + index + '"></table></div>'; }, onExpandRow: function(index,row){ $('#tt-'+index).datagrid({ url:'./scripts/subcong.php?date='+$('#td').datebox('getValue')+'&nodeid='+row.nodeid+'&table='+table, fitColumns:false, singleSelect:true, autoRowHeight:false, height:'auto', scrollsize:0, columns:[[ {field:'nodeid',title:'Nodeid',width:127, sortable:true}, {field:'1',title:'1',width:45, styler:styler100200, sortable:true}, {field:'2',title:'2',width:45, styler:styler100200, sortable:true}, {field:'3',title:'3',width:45, styler:styler100200, sortable:true}, {field:'4',title:'4',width:45, styler:styler100200, sortable:true}, {field:'5',title:'5',width:45, styler:styler100200, sortable:true}, {field:'6',title:'6',width:45, styler:styler100200, sortable:true}, {field:'7',title:'7',width:45, styler:styler100200, sortable:true}, {field:'8',title:'8',width:45, styler:styler100200, sortable:true}, {field:'9',title:'9',width:45, styler:styler100200, sortable:true}, {field:'10',title:'10',width:45, styler:styler100200, sortable:true}, {field:'11',title:'11',width:45, styler:styler100200, sortable:true}, {field:'12',title:'12',width:45, styler:styler100200, sortable:true}, {field:'13',title:'13',width:45, styler:styler100200, sortable:true}, {field:'14',title:'14',width:45, styler:styler100200, sortable:true}, {field:'15',title:'15',width:45, styler:styler100200, sortable:true}, {field:'16',title:'16',width:45, styler:styler100200, sortable:true}, {field:'17',title:'17',width:45, styler:styler100200, sortable:true}, {field:'18',title:'18',width:45, styler:styler100200, sortable:true}, {field:'19',title:'19',width:45, styler:styler100200, sortable:true}, {field:'20',title:'20',width:45, styler:styler100200, sortable:true}, {field:'21',title:'21',width:45, styler:styler100200, sortable:true}, {field:'22',title:'22',width:45, styler:styler100200, sortable:true}, {field:'23',title:'23',width:45, styler:styler100200, sortable:true}, {field:'24',title:'24',width:45, styler:styler100200, sortable:true}, {field:'25',title:'offpeak',width:50, styler:styler200400, sortable:true}, {field:'26',title:'onpeak',width:46, styler:styler200400, sortable:true} ]],
|