javascript - Checking a box in one checkboxgroup disables or hides a box with the same value in another checkboxgroup -
i have extjs window has 2 separate panels checkboxgroups.
both show same values, user cannot select same item both checkboxgroups.
i want deal little fancier checking , alerting warning in both ckeckboxgroup's listeners when user selects selected value in checkboxgroup.
to avoid alerts, want either hide or disable box.
i have tried add hidden:true or disabled:true no luck:
ext.create('widget.window', { title : 'select value', draggable : true, modal : true, closable : true, closeaction : 'destroy', width : 400, height : 350, layout: { type : 'hbox', align : 'stretch' }, items : [{ xtype : 'panel', title : 'success', autoscroll : true, flex : 1, items : [{ xtype : 'checkboxgroup', itemid : 'success', columns : 1, vertical : true, items : yes_checkbox, listeners : { change: function(field, newvalue, oldvalue, eopts) { // newvalue.rb } } }] }, { xtype : 'panel', id : 'panel_failure', title : 'failure', autoscroll : true, flex : 1, items : [{ xtype : 'checkboxgroup', itemid : 'failure', columns : 1, vertical : true, items : no_checkbox, listeners : { change: function(field, newvalue, oldvalue, eopts) { // newvalue.rb } } }], }], }); i tried panel_failed ext.getcmp('panel_failed').items.add(//something here) inside change listener. cannot figure out whether add() right method, , if is, format write inside function.
thanks
you can define itemid of checkboxes , easy select , disable them setdisabled(true);
Comments
Post a Comment