Ext. Form. checkboxgroup and Ext. Form. radiogroup

Source: Internet
Author: User

1. Main configuration of Ext. Form. checkboxgroup

Configuration item Type Description
Allowblank Boolean Set whether at least one item must be selected. "True" indicates that at least one item can be selected. "false" indicates that at least one item cannot be selected. The default value is "true.
Blanktext String Error message when allowblank is set to false and no check box is selected
Columns String/number/Array

Set the number of columns,

Valid values include:

"Auto": Automatically splits the width of the field container.

Number: number of specified Columns

Array specifies the array of column width. integers and floating-point numbers can be used.

Items Array Check box or check box configure an array of Objects

2. Ext. Form. checkboxgroup example

Code:

 <! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"  >  <  Html  Xmlns  = "Http://www.w3.org/1999/xhtml"  >  <  Head  Runat  = "Server"  >      <  Title  > Checkboxgroup and radiogroup examples </  Title  >      <  Link  Href  = "Ext-4.0.7-gpl/resources/CSS/ext-all.css"  REL  = "Stylesheet"  Type  = "Text/CSS"   />      <  Script  SRC = "Ext-4.0.7-gpl/Bootstrap. js"  Type  = "Text/JavaScript"  > </  Script  >      <  Script  Type  = "Text/JavaScript"  >  Ext. onready (  Function  (){ New  Ext. Form. Panel ({Title:  "  Checkboxgroup and radiogroup examples  "  , Bodystyle:  "  Padding: 5  "  , Frame:  True , Height:  150  , Width:  300  , Renderto: Ext. getbody (), defaults: {labelseparator:  "  :  "  , Labelwidth:  80 , Width:  250  , Labelalign:  "  Left  "  }, Items: [{xtype:  "  Radiogroup  " , Fieldlabel:  "  Gender  "  , Columns:  2  , Items: [{boxlabel:  "  Male  "  , Name: "  Sex  "  , Inputvalue:  "  Male  "  }, {Boxlabel:  "  Female  " , Name:  "  Sex  "  , Inputvalue:  "  Female  "  }]}, {Xtype:  "  Checkboxgroup "  , Fieldlabel:  "  Hobbies  "  , Columns:  3  , Items: [{boxlabel:  "  Swimming  " , Name:  "  Swim  "  }, {Boxlabel:  "  Walking  "  , Name:  "  Walk "  }, {Boxlabel:  "  Read  "  , Name:  "  Read  "  }, {Boxlabel:  " Games  "  , Name:  "  Game  "  }, {Boxlabel:  "  Movie  "  , Name: "  Movie  "  }]});  </  Script  >  </  Head  >  <  Body  >  </  Body >  </  Html  > 

:

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.