Results 1 to 2 of 2

Thread: Checkbox group change

  1. #1
    Sencha User michaelc's Avatar
    Join Date
    Dec 2007
    Location
    Bay Area - CA
    Posts
    507
    Answers
    3

    Default Answered: Checkbox group change

    I had a 3 column check box that no longer works when I add the columns.
    Code:
                   
                    var group = Ext.getCmp('regionChkGroup'); //Build chcek boxes based on groups. 
                    for (i = 0; jsonResp.regionListDataObj.length > i; ++i) {
                        regionItem = jsonResp.regionListDataObj[i];
                        var checkbox = new Ext.form.Checkbox({
                            boxLabel: regionItem.REGION_DESCRIPTION,
                            name: regionItem.REGION_ID
                        });
                        checkbox.disable();
                        checkbox.setValue(true);
                        var col = group.panel.items.get(group.items.getCount() % group.panel.items.getCount());
                        col.add(checkbox);
                        group.items.add(checkbox);
                    }

  2. It's been simplified.
    you no longer add to the column but to the component.

    makes scene.
    Code:
                    var group = Ext.getCmp('regionChkGroup'); //Build chcek boxes based on groups. 
                    for (i = 0; jsonResp.regionListDataObj.length > i; ++i) {
                        regionItem = jsonResp.regionListDataObj[i];
                        var checkbox = new Ext.form.Checkbox({
                            boxLabel: regionItem.REGION_DESCRIPTION,
                            name: regionItem.REGION_ID
                        });
                        checkbox.disable();
                        checkbox.setValue(true);
                        group.add(checkbox);
                    }

  3. #2
    Sencha User michaelc's Avatar
    Join Date
    Dec 2007
    Location
    Bay Area - CA
    Posts
    507
    Answers
    3

    Default

    It's been simplified.
    you no longer add to the column but to the component.

    makes scene.
    Code:
                    var group = Ext.getCmp('regionChkGroup'); //Build chcek boxes based on groups. 
                    for (i = 0; jsonResp.regionListDataObj.length > i; ++i) {
                        regionItem = jsonResp.regionListDataObj[i];
                        var checkbox = new Ext.form.Checkbox({
                            boxLabel: regionItem.REGION_DESCRIPTION,
                            name: regionItem.REGION_ID
                        });
                        checkbox.disable();
                        checkbox.setValue(true);
                        group.add(checkbox);
                    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •