1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    5
    Vote Rating
    0
    saracompiler is on a distinguished road

      0  

    Default Unanswered: Infinte grid is not working with arrayStore

    Unanswered: Infinte grid is not working with arrayStore


    Hi,

    I am creating infinite grid in my application. If i use Ext.data.store in grid, then data is rendered in grid. If i use Ext.data.ArrayStore then data is not rendered in grid. please give me solution for this issue. It is too urgent. I have included my code with this mail.

    Ext.onReady(function(){
    Ext.define('User', {
    extend: 'Ext.data.Model',
    fields: [
    'name', 'userId'
    ]
    });

    // create the Data Store
    var store = Ext.create('Ext.data.ArrayStore', {
    model: 'User',
    remoteGroup: true,
    buffered: true,
    leadingBufferZone: 76,
    pageSize: 38,
    proxy: {
    type: 'jsonp',
    url: 'http://localhost:8080/app/index1.jsp',
    reader: {
    root: 'resultData',
    type:'json',
    totalProperty: 'totalCount'
    },


    },

    autoLoad: true,
    listeners: {




    }
    }
    });



    var grid = Ext.create('Ext.grid.Panel', {
    width: 700,
    height: 500,
    collapsible: true,

    title: Infinite grid',
    store: store,
    loadMask: true,
    selModel: {
    pruneRemoved: false
    },
    multiSelect: true,
    viewConfig: {
    trackOver: false
    },

    verticalScroller:{
    variableRowHeight: true

    },
    // grid columns
    columns:[
    {
    xtype: 'rownumberer',
    width: 50,
    sortable: false
    },

    {
    tdCls: 'x-grid-cell-topic',
    text: "name",
    dataIndex: 'name',
    flex: 1,
    sortable: true,
    hideable: false
    },{
    text: "userId",
    dataIndex: 'userId',
    width: 100,
    sortable: true,
    hidden: false,
    hideable: false
    }],
    renderTo: Ext.getBody()
    });
    });


    Thanks & Regards
    Saravanan

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Answers
    13
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    You use an ArrayStore, but give it a URL?

    The purpose of an ArrayStore is to use a javascript array as the data.

    If you give it a Proxy with a URL, it is not an ArrayStore.

    BTW, you do know how to generate a response for JSONP proxy as opposed to a JSON proxy don't you?

Thread Participants: 1

Tags for this Thread