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 8132649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:23:48+00:00 2026-06-06T09:23:48+00:00

I am using ExtJS (3) and just trying to populate a combobox/drop down using

  • 0

I am using ExtJS (3) and just trying to populate a combobox/drop down using records from the database that are being queried using JSON.

Here is my JSON call:

var projectDropDown = new Ext.data.Store({
    autoLoad: true,
    url: 'dropdown.json',
    storeId: 'projectDropDown',
    idProperty: 'ProjectID',
    fields: [ 'ProjectID', 'ProjectName' ]
});

And then my combobox code:

{
    xtype: 'combo',
    id: 'ProjectName',
    fieldLabel: 'Project Name',
    valueField: 'ProjectID',
    displayField: 'ProjectName',
    store: projectDropDown,
    typeAhead: true,
    mode: 'local',
    triggerAction: 'all',
    emptyText:'Select a Project...',
    selectOnFocus:true
}

The JSON is returning my data like this:

[
   {
      "ProjectID":"1",
      "ProjectName":"Mike's Test Project"
   },
   {
      "ProjectID":"2",
      "ProjectName":"My Second Test Project"
   },
   {
      "ProjectID":"3",
      "ProjectName":"My Third Project"
   },
   {
      "ProjectID":"6",
      "ProjectName":"More testing from me"
   }
]

I think I am close, I just don’t see what I am missing to make the connection.

Thanks for any assistance.

  • 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-06T09:23:49+00:00Added an answer on June 6, 2026 at 9:23 am

    The first step I would do would be to output the store (or size of the store or something) to the console to see if the data is getting loaded properly into the store.

    My guess would be that you need to enclose your JSON that is returned into some root object. Try giving your store a JSONReader with a root element specified like so:

    var projectDropDown = new Ext.data.Store({
        autoLoad: true,
        url: 'dropdown.json',
        storeId: 'projectDropDown',
        reader: new Ext.data.JsonReader(
        {
            root: 'projects'
        }),
        idProperty: 'ProjectID',
        fields: [ 'ProjectID', 'ProjectName' ]
    });
    

    Then change the JSON returned to look like this instead

    {
        "projects" : [
           {"ProjectID":"1","ProjectName":"Mike's Test Project"},
           {"ProjectID":"2","ProjectName":"My Second Test Project"},
           ....
        ]
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using extjs and just trying to solve a simple problem: I have a
I'm making an XMLHttpRequest using ExtJS to a service that returns no responseText, just
I have implemented a gridpanel using Extjs that shows the content of a database.
using ExtJS 3 here. I just noticed (in reply to my previous question) that
Using ExtJs. I'm trying to design a main which is divided into three sub
I am using extjs 4.1 and trying to do the event delegation which in
We've just started using Sencha's ExtJS 4 in our project and have been following
im using extjs 4.0 and am trying to combine an editable grid with a
I'm trying to create a web application using a JavaScript framework (eg Extjs) for
I just downloaded the final version of ExtJs 4 and I'm trying to implement

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.