PDA

View Full Version : Unable to create Horizontal Scroll Bar for the Tree Grid



rahul.anand.self
12 Mar 2014, 12:13 AM
Hello all,

I was expecting a Horizontal Scroll Bar when we expand the datas in the Tree Grid.
But unfortunately i m not able to see the underlying datas, when i am expanding the Tree further.

Can you guide me the way to achieve this.
Plz refer the image for more clarifications.

Rahul Anand

48253

mdnaveed42
12 Mar 2014, 1:51 AM
Hi,

As Sencha Fiddle site is down, couldn't provide you fiddle. Sample code for you..

layout: 'anchor' did the trick..


var store = Ext.create('Ext.data.TreeStore', {
root: {
expanded: true,
children: [{
text: "detention",
leaf: true
}, {
text: "homework",
expanded: true,
children: [{
text: "book report",
leaf: true
}, {
text: "algebra",
expanded: false,
children: [{
text: "book report vey long text",
leaf: true
}, {
text: "algebra",
leaf: true
}]
}]
}, {
text: "buy lottery tickets",
leaf: true
}]
}
});


Ext.create('Ext.tree.Panel', {
//title: 'Simple Tree',
width: 150,
height: 150,
layout: 'anchor',
items: {
xtype: 'treecolumn',
header: 'type',
dataIndex: 'text',
flex: 1
},
store: store,
rootVisible: false,
renderTo: Ext.getBody()
});


Thanks,
Md Naveed
\m/