EasyUI Forum
June 16, 2024, 08:02:33 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: How to make the datagrid fill the tabs panel?  (Read 2916 times)
officecode
Jr. Member
**
Posts: 69


View Profile Email
« on: October 30, 2019, 05:53:42 AM »

I use the following code in the page:

Code:
<body class="easyui-layout">
<div region="west" split=true width=280 title="mytitle">
<div id="menu"></div>
</div>
<div region="center">
<div id="ts"></div>
</div>

<script>
$(function(){
$('#menu').tree({
fit:true,
border:false,
data:[{
text:'test1'
},{
text:'test2'
}],
onClick:function(node){
var str = node.text;
if($('#ts').tabs('exists',str)){
$('#ts').tabs('select',str);
}else{
$('#ts').tabs('add',{
title:str,
closable:true,
content:'<div id="' + str + '"></div>'
});
}
}
});
$('#ts').tabs({
border:false,
pill:true,
onAdd:function(title,index){
var dg = $('#' + title);
dg.datagrid({
border:false,
width:'auto',
height:'auto',
// fit:true,
pagination:true,
})
}
});
})
</script>
</body>

Why is the fit property in the datagrid invalid?
What should I do if I want the datagrid to fill the panel? Please help, thank you!
Logged
officecode
Jr. Member
**
Posts: 69


View Profile Email
« Reply #1 on: October 30, 2019, 06:40:35 PM »

solved.
Forget to add fit to true in tabs.
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!