ExtJS 4.2 checkboxgroup usage of data control

Source: Internet
Author: User

Code judgment

{                    xtype: ' Panel ',                    width:750,                    border:false,                    flex:1,                    items: [{                        xtype: ' CheckboxGroup ',                        ID: ' Lbloperationbehavior ',                        name: ' Lbloperationbehavior ',                        itemcls: ' X-check-group-alt ',                        columns:4,                        Fieldlabel: ' Set permissions ',                        labelwidth:100,                        width:750,                        align: ' left ',                        Border:true,                        anchor : ' 100% ', Flex:1                    }]
}

Loading data

Load operation all name function Loadingoperationbehavior () {///through ExtJS Ajax gets the label data associated with the user article Ext.Ajax.request ({url: '/project Web/httphandlerdata/membermanagement/membermanagement.ashx?operation=searchoperationbehavior ', success:function (response)            {var obj = eval ("(" + Response.responsetext + ")"); var len = obj.data.length;//obj.data.length;            Table here refers to a background return similar to data if (Obj.data = = NULL | | len = = 0) {return;            } var checkboxgroup = ext.getcmp ("Lbloperationbehavior");                      for (var i = 0; i < len; i++) {var checkbox = new Ext.form.Checkbox ({ Boxlabel:obj.data[i]. Operationname,//obj. Table[i]. Title; "Title" refers to the returned name Name:obj.data[i]. Operationcode, Inputvalue:obj.data[i].                Opeartionbehaviorid, checked:false});       Checkboxgroup.items.add (checkbox);     } operationdefineform.dolayout (); Re-adjust layout}});

  

 

ExtJS 4.2 checkboxgroup usage of data control

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.