PDA

View Full Version : List of checkboxes



BackgroundTeam
12 Apr 2012, 8:04 AM
Hi everyone,

I want to write a Container with a list of checkboxes.

Each checkbox comes from a store, and then each checkbox will have listeners (check or uncheck), in order to put in another store only the labels of the checkboxes I have filtered.

I could put any code here, but before I want to ask: is this really posible?

I mean, like to "nest" checkboxes as items of the item list from the container.

Thank you very much in advance.

scottmartin
12 Apr 2012, 8:48 AM
I think it would be better ( and easier ) to use a CheckboxGroup:
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.form.CheckboxGroup

Then add a listener and for the group.

Regards,
Scott.

BackgroundTeam
12 Apr 2012, 9:19 AM
Thank you!

But actually I prefer so much the design of the checkboxfield.

That's why I try to figure out how to do it in that way.

scottmartin
12 Apr 2012, 9:27 AM
From your description, it seem like you simply need to design a form. In nesting .. if you mean if you check the parent checkbox and all of the other checkboxes are enabled/disabled.. this should be fine as well.. albeit the child items would be easier as a group instead of having to disable each item.

A handler for each check box, the use setDisabled() to toggle.

Regards,
Scott.

BackgroundTeam
12 Apr 2012, 9:45 AM
Yes! That's exactly my idea!

Thank you a lot, Scott.