PDA

View Full Version : Tree Panel disappears on Expand/Collapse



Mounish S
14 Apr 2014, 11:15 PM
Hi Team,I am using Ext.tree.panel component of Extjs 4.1.0 . If i keep on expanding/collapse the grid at some point of time grid disappears . Again in need to refresh the page . This issue is there in IE 9 not in chrome. Please help me out in this .Thanks & RegardsMounish S

scottmartin
15 Apr 2014, 1:18 PM
I am unable to duplicate this:

https://fiddle.sencha.com/#home

paste code in fiddle and select 4.1.0



Ext.application({
name : 'Fiddle',

launch : function() {


Ext.create('Ext.data.Store', {
storeId:'simpsonsStore',
fields:['name', 'email', 'phone'],
data:{'items':[
{ 'name': 'Lisa', "email":"[email protected]", "phone":"555-111-1224" },
{ 'name': 'Bart', "email":"[email protected]", "phone":"555-222-1234" },
{ 'name': 'Homer', "email":"[email protected]", "phone":"555-222-1244" },
{ 'name': 'Marge', "email":"[email protected]", "phone":"555-222-1254" }
]},
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});

Ext.create('Ext.grid.Panel', {
title: 'Simpsons',
store: Ext.data.StoreManager.lookup('simpsonsStore'),
collapsible: true,
columns: [
{ text: 'Name', dataIndex: 'name' },
{ text: 'Email', dataIndex: 'email', flex: 1 },
{ text: 'Phone', dataIndex: 'phone' }
],
height: 200,
width: 400,
renderTo: Ext.getBody()
});


}
});

Mounish S
15 Apr 2014, 8:27 PM
But i am not using Ext.grid.panel component , i am using Ext.tree.panel component . In that if i keep on Expand/collapse the children then i am facing the issue i.e Grid disappears.

scottmartin
16 Apr 2014, 4:31 AM
My mistake. This example is using a tree, but I do not see an issue here as well.



Ext.application({
name: 'Fiddle',

launch: function() {
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",
leaf: true
}]
}, {
text: "buy lottery tickets",
leaf: true
}]
}
});

Ext.create('Ext.tree.Panel', {
title: 'Simple Tree',
width: 250,
height: 250,
store: store,
collapsible: true,
rootVisible: false,
renderTo: Ext.getBody()
});
}
});


Perhaps some code?