实现CheckboxGroup的全部选中

定义 CheckboxGroup

var myCheckboxGroup=new Ext.form.CheckboxGroup({

  xtype="checkboxgroup",

     column:4,

     items:[{

    boxLabel:'第一个',

    name:'first',

    inputValue:'01'

  },{

 

  boxLabel:'第二个',

  name:'second',

  inputValue:'02

  },{

 

  boxLabel:'第三个',

  name:'third',

  inputValue:'03

  }],

  listeners:{

  render:function(){

  var cbitems=myCheckboxGroup.items;

  for(var i=0;i<cbitems.length;i++){

  //选中

  cbitems.itemsAt(i).setValue(true);

  }

 

  }

  }

})

posted on 2014-07-31 15:26  ligongxiaozhu  阅读(741)  评论(0编辑  收藏  举报

导航