-
1 Dec 2008 1:25 PM #1
check / uncheck all checkboxes in checkboxgroup
check / uncheck all checkboxes in checkboxgroup
Hi there!
I have a problem... (well, I post here in help...
) :
I have a form with a checkboxgroup (as in checkbox/radiobutton example) but I want an additional checkbox that checks/unchecks all checkboxes of a checkboxgroup.
additional problem: in my checkboxgroup my checkboxes are dynamically loaded from database, this means no fix count of boxes, depending on elements in database.
any idea how to set/unset this dynamic checkboxes?
well, I figured out that I need something like a loop to set checked on true/false, but dont know how to get the count of elements in group to do this...
thanx in advance for help...
bye,
oliver
-
1 Dec 2008 3:29 PM #2
Each.each seems to return all the checkboxes properly. From there just check to see if data.data[item.name] exists if it does then set the value.
Code:Ext.each(checkgroup.items.items, function(item) { console.log(item); }, this);
-
2 Dec 2008 1:50 AM #3
any dummy example how this works?
I added a listener to my additional checkboxgroup (with check all checkbox) to check/uncheck all checkboxes in checkboxgroup with fieldname "testgroup".
but how to access this checkboxgroup.
thanx in advance.
bye,
oliver


Reply With Quote