Results 1 to 2 of 2

Thread: get text value selected from selectfield

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Feb 2012
    Location
    Delhi, India
    Posts
    94
    Answers
    2
    Vote Rating
    0
      0  

    Default Answered: get text value selected from selectfield

    I am populating the data in selectfield from database.
    How to get the selected text value from selectfield.

    getValue() does n t wrks here.

    My Model is ....
    Ext
    .regModel(
    'Reason', {fields: [{name : 'description', type: 'string' },{name : 'holdId', type: 'string' },{name : 'name', type: 'string' }]
    });

    My store is.........

    var
    reasonStore = new Ext.data.Store({id: 'reasonStore',model: 'Reason',autoLoad: true,proxy: {type: 'ajax',method:'GET',url: '/AppsOrderProcessingMiddleware/resources/FetchReasonsService/getreasons',reader: { type: 'json',root: 'Response'

    },success:
    function(response, opts) {},failure: function(response, opts) { }}
    });


    and my definition for selectfield is like..........

    xtype:
    'selectfield',id : 'sel',store: 'reasonStore',//name: 'description',id: 'Description',label: 'Description',displayField: 'description',
    valueField: 'holdId' ,

  2. What is getValue returning for you?

  3. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    What is getValue returning for you?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Posting Permissions

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