Results 1 to 5 of 5

Thread: Empty List Items in Combo

  1. #1
    Sencha User
    Join Date
    Jul 2010
    Location
    Pune
    Posts
    31

    Default Empty List Items in Combo

    Hi Guys,

    Can you please help me with this one ?

    I am trying to populate an combo box, by explicitly sending the AJAX call using JsonStore. Below is the code for retrieving the store:

    getProductTypeStore: function () {

    var store = new Ext.data.JsonStore({
    url: 'controllers/Combo.ashx',
    fields: ['DISPLAY_VALUE', 'LOOKUP_ID'],
    baseParams: {
    comboType: 'ProductType'
    },
    scope: this
    });

    return store;
    },

    I am getting below response, and assigning the above store to Combo.

    [["Product",656],["Product",654],["Product",653],["Product",657]]

    But I am not able to view the TEXT value in combo dropdown, instead it just displays the empty items, i.e. if total records are 3, it displays 3 empty items in combo (see the attachment).

    Any idea what could be the issue, am I missing anything ?

    emptycombo.JPG

  2. #2
    Sencha Premium User danguba's Avatar
    Join Date
    Feb 2009
    Location
    Kragujevac, Serbia
    Posts
    434

    Default

    R U setting displayField:'DISPLAY_VALUE' in Ur combo config?
    All Best
    ---
    Željko Mitrović
    http://skitanja.blogspot.com/

    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." Martin Golding

  3. #3
    Sencha User
    Join Date
    Jul 2010
    Location
    Pune
    Posts
    31

    Default

    Yes, I am setting two parameters in Combo config

    displayField: 'DISPLAY_VALUE',
    valueField:
    'LOOKUP_ID',
    store: this.getProductTypeStore(),

    Also store as call to method (mentioned in above post) that retrieves the required data.

    Still its not working, what could be wrong ???




  4. #4
    Sencha Premium User mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    3,153

    Default

    Your data is not Json, you should use an ArrayStore instead.

  5. #5
    Sencha User
    Join Date
    Jul 2010
    Location
    Pune
    Posts
    31

    Default

    Bang !!! It worked ! I wonder how could I didn't realized that.

    Thanks a lot mankz. You guys are really helpful.

Similar Threads

  1. Replies: 0
    Last Post: 3 Dec 2010, 7:06 AM
  2. Combobox inner list not aligning list items propertly ?
    By ritesh.kapse in forum Ext 2.x: Help & Discussion
    Replies: 13
    Last Post: 29 Oct 2010, 5:29 AM
  3. Replies: 1
    Last Post: 17 Sep 2010, 3:02 AM
  4. combo box width dependent of list items' text width
    By wp.joju in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 6 Jul 2010, 9:27 PM
  5. View gives empty list form Store that is not empty
    By oyvindsaltvik in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 12 Jun 2007, 4:17 AM

Tags for this Thread

Posting Permissions

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