samedi 14 juin 2014

Tree panel inside panel scroll bar issues

I am extjs sand box mode. I added a tree panel to a normal panel

The tree panel scrolle bars are hiding inside the parent panel. The scroll bars are not coming for the parent panel.

but the child scroll bars are hiding inside the parent panel if the data and columns are more.

how to fit the parent panel dimensions to the child panel



Code:



var treerender = "tree_"+repName+'div';
//alert(treerender)
var treePanel = new Ext.Panel({
id:'treeObjPanel'+repName,
//widht:500,
layout:'fit',
html:'<div id="'+treerender+'" style = width:'+(resolutionWidth-30)+';height:'+(tabHeight-90)+'; ></div>'
});


idToLoad.add(treePanel);
idToLoad.doLayout();

var fields=res["Fields"];
var store = Ext4.create('Ext4.data.TreeStore', {
fields:fields,
root:{
text: 'Root',
expanded: true,
children:res["ReportDatas"]
},
id: 'id',
successProperty: 'success',
columnheaders:res["ReportHeader"],
reportData: res["ReportDatas"],
reportTitle:resA["title"],
reportPivot:pivottype,
idToLoad:idToLoad,
pivotByColumn:res["groupName"],
legendColumnName:res["legendColumnName"]

});
//alert('Column Model..'+Ext.util.JSON.encode(treegridColumnModel));
var treegrid=Ext4.create('Ext4.tree.Panel', {
renderTo:treerender,
rootVisible:false,
useArrows:true,
autoScroll:true,
//width:650,

//forceFit: true,
columns: treegridColumnModel,
store:store,
frame:false,
border:false,
listeners : {
itemclick: function( view, record, item, index, e, eOpts )
{

var xPos = e.getXY()[0];
var colIndex="";
var cols = view.getGridColumns();

for(var c in cols) {

var leftEdge = cols[c].getPosition()[0];
var rightEdge = cols[c].getSize().width + leftEdge;

if(xPos>=leftEdge && xPos<=rightEdge)
{
colIndex=c;
break;
}
}
treedrilledReports(view,record,colIndex,index,item,e,idToLoad,resA);
}}

});
unMaskLayout();
}

If i mimimize all the parent nodes then the scroll bar is appearing for the child tree panel

help me with a solution please.1.jpg2.jpg3.jpg


Aucun commentaire:

Enregistrer un commentaire