3 Replies Latest reply on Nov 16, 2012 2:41 AM by Veena_07

    How to load all checkboxes "checked" initially?

    Veena_07 Level 4



           I am loading a set of checkboxes through xtype:selection  and type: checkbox. As per my requirement initially (first time load) all the checkboxes should be checked.. How can i acheive this. Any help would be appreciable.



      Thanks in Advance



        • 1. Re: How to load all checkboxes "checked" initially?
          Naidu Jakkana Level 1

          You can add listeners "loadcontent" .there you can add desired behaviour. Here is the sample.

          function(){ var panel=this.findParentByType('tabpanel'); var typeVal=this.getValue();..............................}


          hope this helps.

          • 2. Re: How to load all checkboxes "checked" initially?
            rush_pawan Level 4

            I think you need not require to write listener to check all the checkbox under selection (xtype). By seeing above scenario i hope you have created drop down list as below

            1. xtype as 'selection'

            2. type as 'checkbox'

            3. and that node has all the options under it using 'options' widget colletction (because that way only you can have multiple options)


            Follow below to make default checks for all your options.


            --> Create a new property with name 'defaultValue' as 'String[]' at selection node where you have configured (xtype-selection and type-checkbox) and in value list all options value which you want to default check.


            Note: here the value should match with value of your options value (let say first option configured like 'text - first' and 'value - firstvalue' then you should insert 'firstvalue'.


            I hope it will help you to complete your task. Let me know if it doesn't work or face any issue.

            • 3. Re: How to load all checkboxes "checked" initially?
              Veena_07 Level 4

              Thanks pawan


                             it works