How to load itemselector

  1. #1

    How to load itemselector

    How to load data in itemselector

    After ajax i got data in array and called the below function, Now what i have to do to show data in itemselector

    loadInvestMultilist: function() {
    var investData = arguments[0].reportData;
    this.fromStore = new Ext.data.Store({
    id: 'fromStore',
    data: investData,
    reader: new Ext.data.JsonReader(
    {
    id: 'Id'
    },
    Ext.data.Record.create([
    { name: 'Id', mapping: 'Id' },
    { name: 'Name', mapping: 'Name' }
    ])
    )
    });
    this.toStore = new Ext.data.Store({
    id: 'toStore',
    data: this,
    reader: new Ext.data.JsonReader(
    {
    id: 'Id'
    },
    Ext.data.Record.create([
    { name: 'Id', mapping: 'Id' },
    { name: 'Name', mapping: 'Name' }
    ])
    )
    });
    }
    here is code for my itemselector

    items: {
    xtype: 'itemselector',
    name: 'investSelector',
    id: 'investSelector',
    imagePath: "ExtLib/plugins/images/",
    imagePath: Module.getEnv('EXTUX_MULTISELECT_PATH')+"images/",
    drawUpIcon: false,
    drawDownIcon: false,
    drawTopIcon: false,
    drawBotIcon: false,
    width: 400,
    height: 180,
    multiselects: [{
    width: 150,
    height: 150,
    legend: " ", 
    draggable:false,
    droppable:false, 
    store:this.fromStore,
    displayField: 'Name',
    valueField: 'Id'
    },{
    width: 150,
    height: 150,
    legend: " ", 
    draggable:false,
    droppable:false, 
    store: this.toStore,//[["0", "All"]],
    displayField: 'Name',
    valueField: 'Id'
    }]
    }
    Last edited by geoffrey.mcgill; Jul 21, 2010 at 9:07 PM. Reason: please use [code] tags

Similar Threads

  1. Replies: 2
    Last Post: Jul 05, 2012, 8:49 AM
  2. Replies: 18
    Last Post: Jul 20, 2011, 8:59 PM
  3. [CLOSED] Stop treepanel to load data on page load
    By inayath in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 11, 2011, 10:17 AM
  4. Replies: 7
    Last Post: Sep 22, 2010, 8:07 AM
  5. [CLOSED] PanelBase.Load hides Control.Load Event
    By randy85253 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Apr 22, 2009, 12:36 AM

Posting Permissions