Creating Combobox in Javascript without store

  1. #1

    Creating Combobox in Javascript without store

    Hi,
    Is there any simple way to dynamically create a combo from javascript without using a store? I tried all possible ways and it doesn't work correctly
  2. #2
    Store is required, what exactly troubles with a store do you have?
    var combo = new Ext.form.ComboBox({
        typeAhead: true,
        triggerAction: 'all',
        lazyRender: true,
        mode: 'local',
        store: new Ext.data.ArrayStore({
            id: 0,
            fields: ['myId', 'displayText'],
            data: [
                [1, 'item1'],
                [2, 'item2']
            ]
        }),
        valueField: 'myId',
        displayField: 'displayText'
    });
  3. #3
    Thanks a lot. Working like a chime
    Quote Originally Posted by Vladimir View Post
    Store is required, what exactly troubles with a store do you have?
    var combo = new Ext.form.ComboBox({
        typeAhead: true,
        triggerAction: 'all',
        lazyRender: true,
        mode: 'local',
        store: new Ext.data.ArrayStore({
            id: 0,
            fields: ['myId', 'displayText'],
            data: [
                [1, 'item1'],
                [2, 'item2']
            ]
        }),
        valueField: 'myId',
        displayField: 'displayText'
    });

Similar Threads

  1. [CLOSED] Creating Combobox + Store in CodeBehind
    By trezv in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Mar 12, 2015, 1:41 PM
  2. [CLOSED] How to change combobox store in javascript ?
    By imaa in forum 1.x Legacy Premium Help
    Replies: 13
    Last Post: Apr 01, 2013, 5:44 AM
  3. Replies: 0
    Last Post: Mar 27, 2013, 11:38 AM
  4. [CLOSED] creating tabStrip in javascript
    By supera in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: May 10, 2012, 5:58 PM
  5. Replies: 12
    Last Post: Sep 20, 2011, 2:33 PM

Posting Permissions