PDA

View Full Version : [SOLVED] Checkboxgroup problem in a collapsed panel



attu
27 Nov 2009, 6:00 AM
Hi everybody!

I've got this panel:


var fsDisenio = new Ext.Panel({
id: 'fsDisenio',
title: 'title',
collapsible: true,
collapsed: true,
frame: true,
layout: 'form',
anchor: '99%',
items:[{
xtype: 'panel',
id: 'panelFieldset',
layout: 'form',
anchor: '99%'
}]
});
And those checkboxgroups:




var grupoCheckbox = new Ext.form.CheckboxGroup({
fieldLabel: 'label',
id: 'linea',
labelSeparator: '',
itemCls: 'x-check-group-alt',
columns: 3,
anchor: '99%',
items: [{
boxLabel: '',
name: 'check1',
inputValue: '1'
},{
boxLabel: '',
name: 'check2',
inputValue: '2'
},{
boxLabel: '',
name: 'check3',
inputValue: '3'
}],
listeners:{
change: function(){
//I call to AJAX to insert or delete from database
operacionCheck();
}
}
});
To render it i use this:


Ext.getCmp('panelFieldset').add(grupoCheckbox);
Ext.getCmp('panelFieldset').doLayout();
After that, i try to setValues:


Ext.getCmp('linea').setValue('check1', true);
Ext.getCmp('linea').setValue('check2', true);
Ext.getCmp('linea').setValue('check3', true);
If 'fieldsetPanel' is not collapsed initially it works perfect, but if it's collapsed it only setValue to the last check of my checkboxgroup.

Do you know what's happening here?

Thanks!

attu
29 Nov 2009, 11:12 PM
Does anybody know what is happening here?

Thanks in advance!

attu
30 Nov 2009, 2:41 AM
Ok, i found the solution. Right now, i send values in a json and i use this to setValues:


myCheckboxGroup.setValue([true, false, false]);


It works if i define it collapsed.

Bye!