PDA

View Full Version : tick all checkboxes in a gridPanel in a formPanel



nadeemshafi9
22 Apr 2009, 5:54 AM
hello guys,

I have a gridpanel inside a formpanel inside a window.

I have a button and a listener set up to tick teh bixes, but i cant seem to get the checkbox element.

Its enumerated so its like checks[0] checks[1] checks[40] checks[50] in the name field of the input.

I tried


click: function() {
Ext.each(Ext.getCmp('updateUserGroupsFormPanel').getForm().findField('checks'), function(){
alert('dd');
});
alert('dd');
}i tried
Ext.getCmp('updateUserGroupsFormPanel').getForm().findField('checks')

in firebug it dosent get the checkboxes

i also tried findField('checks[]')


this works Ext.getCmp('updateUserGroupsFormPanel').getForm().getEl('checkbox')
Dosent work,


Thanks

22 Apr 2009, 6:10 AM
Keep in mind: in the grid panel, it's different because you have to update the store.

nadeemshafi9
22 Apr 2009, 6:11 AM
Keep in mind: in the grid panel, it's different because you have to update the store.

your right actualy thats a good idea, my checks come out with the store in the json so yeh maybe thats a good idea lol


SOOOOOOOOOOOOO simple