Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8440333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:15:57+00:00 2026-06-10T08:15:57+00:00

I have a following code for combo box, how can I get the value

  • 0

I have a following code for combo box, how can I get the value that is selected in the combobox and load that value into a variable, and use it later.

Thank you

Ext.define('Column', {
    extend: 'Ext.data.Model',
    fields: ['data1', 'Data2']
});

var store = Ext.create('Ext.data.Store', {
    model: 'Column',
    autoLoad: true,
    proxy: {
        type: 'ajax',
        url: '/data.xml',
        reader: {
            type: 'xml',
            record: 'result'
        }
    }
});

var simpleCombo = Ext.create('Ext.form.field.ComboBox', {
    store: store,
    displayField: 'data1',
    valueField: 'data1',
    width: 250,
    labelWidth: 120,
    fieldLabel: 'select a value',
    renderTo: 'simpleCombo',
    queryMode: 'local',
    typeAhead: true
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T08:15:58+00:00Added an answer on June 10, 2026 at 8:15 am

    Simply use the select event

    var simpleCombo = Ext.create('Ext.form.field.ComboBox', {
                store: store,
                displayField: 'data1',
                valueField: 'data1' ,
                width: 250,
                labelWidth: 120,
                fieldLabel: 'select a value',
                renderTo: 'simpleCombo',
                queryMode: 'local',
                typeAhead: true,
                listeners: { 
                   select: function(combo, records) {
                       // note that records are a array of records to be prepared for multiselection
                       // therefore use records[0] to access the selected record
                   }
            });
    

    API Link

    Additional content from the comments:

    Take a look at the multiSelect property of the combobox. You get all values separated by a defined delimiter and the select event will give you a records array with more that one record. Note the that getValue() only give you the defined displayField which is a string and not the record itself. So using iComboValue[0] gives you the first character. The selected records should always be accessed using the selected event. But you may store them in a array for later use and overwrite it with any new select.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a combobox that is bound to an enum using the following code:
I have the following code: <select name=to class=combo value=' <?php if(isset($_POST['reply'])) { echo <option
I have following code for inserting data into database using PDO. It inserts data
I have following code that I am compiling in a .NET 4.0 project namespace
I have following code that is generating random no. between 1 to 10. This
Here is the set up, (all testing code) I have a combo box on
I have a following XAML: <ComboBox Name=groupComboBox ItemsSource={Binding Path=MyServiceMap.Groups} DisplayMemberPath={Binding Name}/> In the code
In the following code, I tell the ComboBox to use the DataTemplate called CustomerTemplate
I have the following combo box which sets the number of images displayed per
I have an application that executes a stored procedure. There is a combo box

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.