Results 1 to 3 of 3

Thread: how to checked and unchecked radio button using checked and unchecked button

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Ext User
    Join Date
    Sep 2008
    Posts
    45
    Vote Rating
    0
      0  

    Default how to checked and unchecked radio button using checked and unchecked button

    I have radio button. I have one Checked button and another one Unchecked button. When i click unchecked button there should unchecked the selected radio button. when i click checked button there should checked the unchecked radio button.

    help me.

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    118
      0  

    Default

    Here is an example:
    Code:
    new Ext.Viewport({
    	layout: 'fit',
    	items: {
    		xtype: 'form',
    		items: [{
    			id: 'radio',
    			fieldLabel: 'Radio',
    			xtype: 'radio',
    			name: 'radio'
    		}],
    		tbar: [{
    			text: 'Check',
    			handler: function(){
    				Ext.getCmp('radio').setValue(true);
    			}
    		},{
    			text: 'Uncheck',
    			handler: function(){
    				Ext.getCmp('radio').setValue(false);
    			}
    		}]
    	}
    });
    ps. But normally, you don't uncheck a radio...

  3. #3
    Sencha User
    Join Date
    Sep 2012
    Posts
    13
    Vote Rating
    0
      0  

    Default

    Its working

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •