I use the following code in the page:
<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!