界面如图: 上面是ComboBox,下边是CheckboxGroup 复选框组,我想实现:当有一个复选框被选中,就从新加载ComboBox的值??请大侠赐教了??

解决方案 »

  1.   

    读取checkGroup中的选定值,动态写到comboBox的store中。
    checkGroup可以用items.each(),取checked=true的项的值。
    comboBox.getStore().loadData([{item:'你的值'},...])
    这是只是思路,仅供参考。
      

  2.   

     var cityCheckGroup=new top.Ext.form.CheckboxGroup({
         id:'cityCheckGroup',
                fieldLabel: '选择地市',
                columns: 5,
                id:'cityCheckGroup',
                name:'cityCheckGroup',
                disabled:isDisable,
                columnWidth:40,
                items: [
                    {boxLabel: '全省', inputValue:'全省'},
                    {boxLabel: '南京', inputValue:'南京'},
                    {boxLabel: '苏州', inputValue:'苏州'},
                    {boxLabel: '镇江', inputValue:'镇江'},
                    {boxLabel: '无锡', inputValue:'无锡'},
                    {boxLabel: '南通', inputValue:'南通'},
                    {boxLabel: '淮安', inputValue:'淮安'},
                    {boxLabel: '盐城', inputValue:'盐城'},
                    {boxLabel: '常州', inputValue:'常州'},
                    {boxLabel: '扬州', inputValue:'扬州'},
                    {boxLabel: '连云港',inputValue:'连云港'},
                    {boxLabel: '徐州', inputValue:'徐州'},
                    {boxLabel: '宿迁', inputValue:'宿迁'},
                    {boxLabel: '泰州', inputValue:'泰州'}
                ]
            });
    这个是我定义的一个CheckboxGroup,每选中一个城市下边的comboxBox就重新加载值,我想知道用CheckboxGroup的什么事件触发呀,在网上找了好多,没找到!请
    WSJ741
    (云满楼)
    给点提示呗??
      

  3.   

    comboBox的STore可以ArrayStore为例,
    var arrCity=[];
    在选择事件中写以下代码:cityCheckGroup.items.each(i){
      arrCity.push({city:i.inputValue});
    }
    cmbCity.getStore().loadData(arrCity);----
    应该是这样写,我没测试,凭记忆写的。