EasyUI Forum
April 19, 2024, 03:37:46 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: subgrid toolbar  (Read 7093 times)
wymak
Newbie
*
Posts: 26


View Profile
« on: May 20, 2016, 09:23:30 AM »

I have created a grid, with subgrid  as follow (it is more or less the same as the example code)
The problem is: How can I add a toolbar to this sub-grid? Thx

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=901001&txnum=" + row.txnum,
//url:'datagrid22_getdetail.php?itemid='+row.itemid,
fitColumns:true,
singleSelect:true,
rownumbers:true,
loadMsg:'',
height:'auto',
columns:[[
{field:"txdate", title:'Date', width:30},  
{field:"descp", title:'Detail', width:80},  
{field:"stage", title:'Stage', width:20},  
{field:"payway", title:'Pay Method', width:20},  
{field:"paid", title:'Paid', width:20},  
{field:"dr", title:'Dr', width:20}  
]],
onResize:function(){
$('#dg').datagrid('fixDetailRowHeight',index);
},
onLoadSuccess:function(){
setTimeout(function(){
$('#dg').datagrid('fixDetailRowHeight',index);
},0);
}
});
$('#dg').datagrid('fixDetailRowHeight',index);
}
});

« Last Edit: May 20, 2016, 09:25:43 AM by wymak » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: May 21, 2016, 02:28:39 AM »

You can set the 'toolbar' property to setup the datagrid toolbar. Please look at this example http://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=default&dir=ltr&pitem=DataGrid%20with%20Toolbar
Logged
aswzen
Sr. Member
****
Posts: 287


Indonesian

aswzen
View Profile WWW Email
« Reply #2 on: March 27, 2017, 10:17:24 AM »

You can set the 'toolbar' property to setup the datagrid toolbar. Please look at this example http://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=default&dir=ltr&pitem=DataGrid%20with%20Toolbar

How to style the toolbar wrapper css if its created on javascript?
Logged

Regards,
Sigit

- Indonesian jEasyUI Facebook page : https://www.facebook.com/groups/jeasyuiid/
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!