View Full Version : Checkboxgroup and checked are invalid

18 Jan 2010, 9:19 AM
I have a xtype: 'checkboxgroup' with 7 items in it. When i click on a grid, some of the checks must be checked = true. I can do that with no problems

The problem is when i send the Form and it says is not valid because the allowBlank: false

f = Ext.getCmp("my_form_name").getForm().getEl().dom.check_group_name;

f[3].checked = true;

What is the best way to check a checkbox item and avoid this allowBlank problem ?

18 Jan 2010, 11:39 AM
Finally i figure out how to do this

var fp1 = Ext.getCmp("form_name").getForm();
var x = fp1.items.items[3].items;

for (i = 0; i < x.length; i ++) {
x.items[i].setValue(false); // to uncheck

One line is:

var x = Ext.getCmp("form_name").getForm().items.items[3].items;

You need to change number 3 for your own item number