-
18 Jan 2011 12:48 AM #91Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
The line I posted should remove the entire CheckboxGroup, including all contained checkboxes.
Are you saying it doesn't?
-
18 Jan 2011 1:00 AM #92
Yes it does not remove all the previously generated checkboxes from the form , it only overwrites with the new checkboxes. So if the second time less checkboxes are generated then it overwrites only that many of previously generated checkboxes.
I hv attached one image. In this when I select Iris from combobox then 3 checkboxes are generated but when I select oracle then only one checkbox should be generated...but here it only overwrites the first checkbox of Iris with oracle and the remaining checkboxes of Iris remain on the form..
-
18 Jan 2011 3:19 AM #93
Hi Condor,
Thank you so much for ur help...finally my problem is solved..now can u tell me how to get the value of checked checkboxes?? I hv tried the following
But its only shows the [object,object].Code:alert(Ext.getCmp('checkGroup').getValue());
Thanks,
Komal
-
18 Jan 2011 3:51 AM #94Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
getValue() returns an array of the selected checkboxes. What kind of output would you like to have?
-
18 Jan 2011 4:20 AM #95
Hi,
I want the name of the selected checkboxes instead of [object,object].
-
18 Jan 2011 4:26 AM #96Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
Names? Don't you mean inputValues?
Code:var checkboxes = Ext.getCmp('checkGroup').getValue(), values = []; Ext.each(checkboxes, function(cb) { values.push(cb.inputValue); }); alert(values);
-
18 Jan 2011 5:20 AM #97
Hi Condor,
Thank u so much.... u hv helped me a lot..

Thanks,
Komal


Reply With Quote