1. #1
    Sencha User
    Join Date
    Jul 2010
    Location
    Pune
    Posts
    25
    Vote Rating
    0
    sachindhake is on a distinguished road

      0  

    Lightbulb Get the value of boxLabel for selected Radio buton in RadioGroup

    Get the value of boxLabel for selected Radio buton in RadioGroup


    Very tiny issue, but not getting any idea how to go about it. Please Help !!!

    Consider below Radio group:


    { fieldLabel: 'Control', id: 'ControlType', hiddenName: 'ControlType', xtype: 'radiogroup'
    items: [
    { boxLabel: 'X-Control', name: 'rb-ControlType', inputValue: 'XXXXX' },
    { boxLabel: 'Y-Control', name: 'rb-
    ControlType', inputValue: 'YYYYY' }
    ]
    }


    What I want is to retrieve BOTH values of the SELECTED radio i.e. boxLabel and inputValue.

    I can get the value of inputValue property using getValue() method, but how to retrieve the value of boxLabel for the same.

    Any idea or suggestions ? Or any other way to get more than 2 values for the same scenario.

    Thanks in advance.


  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,592
    Vote Rating
    323
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Please use code tags when posting code examples (# button on the toolbar).

    You can get to the label with radio.boxLabel, but you shouldn't be trying to retrieve this label in the first place. The value returned by getValue() should uniquely identify the entry within your data model and if you need the boxLabel for something else you should grab it from that entry.

Thread Participants: 1

Tags for this Thread