PDA

View Full Version : Grid setTitle method is making the collapse tool disappear



Srikanth474
19 Jun 2012, 12:03 PM
Hi, I have a grid which is collapsible. based on some criteria i am changing the grid title using setTitle() method. but it makes my collapse icon disappear.

There is a comment in documentation for setTitle method saying call show() before using setTitle() but it does not do anything.

Thanks
Srikanth

scottmartin
20 Jun 2012, 3:03 PM
I do not see this behavior:



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

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

grid.setTitle('New Title for Simpsons');


Scott.

Srikanth474
22 Jun 2012, 10:57 AM
Hello Scott,
I am using 4.0.7 and i do see this behaviour. it does not happen every time. may be once every 4 or 5 times.

instead of using the collapsible:true feature i am using a tool and collapsing the grid if it is expanded and expanding if it is collapsed on clicking the tool.

thanks
srikanth

scottmartin
22 Jun 2012, 11:04 AM
I would highly recommend upgrading from 4.07 to 4.1.1. Many issues were resolved.

Scott.

mysticav
24 Jul 2012, 12:17 AM
Tested with GA version and the bug is still there.

evant
24 Jul 2012, 12:20 AM
Testing the GA version with what code?