EasyUI Forum
May 16, 2024, 03:42:16 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Retrieve data from the subgrid  (Read 4258 times)
wymak
Newbie
*
Posts: 26


View Profile
« on: May 21, 2016, 10:23:45 AM »

I have subgrid defined under master datagrid 'dg', as follow. How can I retrieve the index of the highlighted row of the subgrid and hence the value of, say, 4th row in the 'Date' column of the expanded subgrid?

Code:
$(function(){


$('#dg').datagrid({
view: detailview,
detailFormatter:function(index,row){
return '<div style="padding:2px"><table class="ddv"></table></div>';
},
onExpandRow: function(index,row){
var ddv = $(this).datagrid('getRowDetail',index).find('table.ddv');

ddv.datagrid({
url: "gettxprog.php?patno=901215&txnum=" + row.txnum,
//url:'datagrid22_getdetail.php?itemid='+row.itemid,
fitColumns:true,
edatagrid:true,
singleSelect:true,
rownumbers:true,
loadMsg:'',
height:'auto',
toolbar:subTb,
columns:[[
{field:"txdate", title:'Date', width:30, editor:'text'}, 
{field:"descp", title:'Detail', width:80, editor:'text'}, 
{field:"stage", title:'Stage', width:20, editor:'text'}, 
{field:"payway", title:'Pay Method', width:20, editor:'text'}, 
{field:"paid", title:'Paid', width:20, editor:'text'}, 
{field:"dr", title:'Dr', width:20, editor:'text'} 
]],
onResize:function(){
$('#dg').datagrid('fixDetailRowHeight',index);
},
onLoadSuccess:function(){
setTimeout(function(){
$('#dg').datagrid('fixDetailRowHeight',index);
},0);
}
});
$('#dg').datagrid('fixDetailRowHeight',index);
}
});
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!