Results 1 to 6 of 6

Thread: How to get the selected value from radio group

  1. #1

    Default How to get the selected value from radio group

    Hi,
    how can i get the selected value from radio group. following is my radio group.
    Code:
     {
                                 xtype: 'radiogroup',
                                 fieldLabel: '<font color="red">* </font>Allow Credit',
                                 width:130,
                                 items: [
                                     {boxLabel: 'YES', name: 'rb-allow-credit', inputValue: 1},
                                     {boxLabel: 'NO', name:  'rb-allow-credit', inputValue: 2, checked: true}
                                 ]
                             }
    thanks

  2. #2
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    if i'm not mistaking, Ext.getCmp('yourRadioGroup').getValue()

  3. #3
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Quote Originally Posted by [email protected] View Post
    if i'm not mistaking, Ext.getCmp('yourRadioGroup').getValue()
    No, that won't work.

    CheckboxGroup and RadioGroup are still missing getValue and setValue methods (see bugreport with possible fixes).

  4. #4

    Default

    I found following way in below link
    "http://extjs.com/forum/showthread.php?t=5911",

    Code:
    var allowCredit             = Ext.DomQuery.selectValue('input[name=rb-allow-credit]:checked/@value');
    Thanks.

  5. #5
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    i find it a bit amusing that they have validation methods.

  6. #6
    Sencha User bt_bruno's Avatar
    Join Date
    Mar 2008
    Location
    Redwood City, CA
    Posts
    153

Posting Permissions

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