tags:

views:

11

answers:

1

Hello,

I am using ExtJS, and i have the following component:

var AlgoField = [{ bodyStyle: 'padding-right:5px;', id:'algo_id ', items: [{ xtype: 'fieldset', title: 'Algorithms\' Field', autoHeight: true, collapsed: true,
collapsible: true,
items : [itemAlgo_1, itemAlgo_4, itemAlgo_3, itemAlgo_2] }] }]

I want to set the collapsed property to false, when occur an event, and I don't know how to get this property and set it to false . (I thought something like this: Ext.get('algo_id').collapsed=false but it doesn't work)

Please help me...

Thanks a lot.

A: 

You need to give the fieldset an ID and refer to it, not its parent, i.e:

var AlgoField = [{ bodyStyle: 'padding-right:5px;', id:'algo_id ', items: [{ xtype: 'fieldset', id:'collapse_this',title: 'Algorithms\' Field', autoHeight: true, collapsed: true,
collapsible: true,
items : [itemAlgo_1, itemAlgo_4, itemAlgo_3, itemAlgo_2] }] }]

Then use:

Ext.getCmp('collapse_this').collapse();
Ergo Summary
It was very helpful. Thank you very very much.
aleka
Its a pleasure :)
Ergo Summary