Results 1 to 3 of 3

Thread: [Extjs4.2] Infinite scroll doesn't work ....

  1. #1
    Sencha User
    Join Date
    Oct 2007
    Posts
    89

    Default [Extjs4.2] Infinite scroll doesn't work ....

    Hi,

    I created a grid panel with a store to use infinite scroll but when I use the scroll bar
    there is no request executed on my server and i see always the first datas

    What's the problem ?

    My code

    Code:
    var store = Ext.create('Ext.data.JsonStore', {
            id: 'store',
            buffered: true,
            leadingBufferZone: 300,
            pageSize: 100,
            fields: [
              {
                name: this.fieldValueAxis
              }
            ],
            proxy: {
              type: 'ajax',
              url: "/AmGetAxisList.aspx",
              reader: {
                type: 'json',
                root: 'data',
                totalProperty: 'total'
              }
            },
            autoLoad: true
          } );
    
    
          var grid = Ext.create( 'Ext.grid.Panel', {
    
            store: store,
            hideHeaders: true,
            loadMask: true,
            selModel: sm,
            multiSelect: false,
            viewConfig: {
              trackOver: false,
              emptyText: '<h1 style="margin:20px">No matching results</h1>'
            },
            // grid columns
            columns: [
            { header: "Axe", sortable: true, flex: 1, dataIndex: this.fieldValueAxis }
            ]
          } );
    
    
          var titleWindow = "Slectionner une valeur";
    
    
          this.window = Ext.create( 'Ext.window.Window', {
            title: titleWindow,
            height: 350,
            width: widthWindow,
            y: yBtn + heightButton,
            x: xWindow,
            draggable: false,
            layout: 'fit',
            closeAction: 'hide',
            items: [
                   grid
            ],
            buttons: [
             {
               text: 'Fermer',
               scope: this,
               handler: this.onCancelClick
             }
            ]
          } );
    My server return the data :

    Code:
    { "total":"100", "data":[{"axe":"(ex)-B514_ex-D514-1"},{"axe":"(ex)-B514_ex-D514-2"},{"axe":"(ex)-D101A"},{"axe":"(ex)-D119"},{"axe":"(ex)-D120"},{"axe":"(ex)-D123"},{"axe":"(ex)-D138B"},{"axe":"(ex)-D139"},{"axe":"(ex)-D140A"},{"axe":"(ex)-D142"},{"axe":"(ex)-D159"},{"axe":"(ex)-D162"},{"axe":"(ex)-D167"},{"axe":"(ex)-D168"},{"axe":"(ex)-D169"},{"axe":"(ex)-D170"},{"axe":"(ex)-D174"},{"axe":"(ex)-D180A"},{"axe":"(ex)-D196"},{"axe":"(ex)-D208"},{"axe":"(ex)-D212"},{"axe":"(ex)-D218"},{"axe":"(ex)-D22"},{"axe":"(ex)-D220"},{"axe":"(ex)-D224"},{"axe":"(ex)-D224A"},{"axe":"(ex)-D225"},{"axe":"(ex)-D225A"},{"axe":"(ex)-D227"},{"axe":"(ex)-D232"},{"axe":"(ex)-D235"},{"axe":"(ex)-D259"},{"axe":"(ex)-D271"},{"axe":"(ex)-D275"},{"axe":"(ex)-D280A"},{"axe":"(ex)-D33"},{"axe":"(ex)-D41"},{"axe":"(ex)-D45"},{"axe":"(ex)-D45C"},{"axe":"(ex)-D5"},{"axe":"(ex)-D51"},{"axe":"(ex)-D514"},{"axe":"(ex)-D524"},{"axe":"(ex)-D54"},{"axe":"(ex)-D579"},{"axe":"(ex)-D6"},{"axe":"(ex)-D675"},{"axe":"(ex)-D71"},{"axe":"(ex)-D8"},{"axe":"(ex)-D80"},{"axe":"(ex)-D89"},{"axe":"14D0001"},{"axe":"A13"},{"axe":"A13_G"},{"axe":"A132"},{"axe":"A132_G"},{"axe":"A29"},{"axe":"A29_G"},{"axe":"A813"},{"axe":"A813_G"},{"axe":"A84"},{"axe":"A84_G"},{"axe":"A88"},{"axe":"A88_G"},{"axe":"B_579_613"},{"axe":"B_A13_A132_D579"},{"axe":"B_Cites_403"},{"axe":"B_Cites_403_G"},{"axe":"B_Eglise_403"},{"axe":"B_N158_562B"},{"axe":"B_RueAnguerny(Mathieu)_7"},{"axe":"B141_141"},{"axe":"B141_515"},{"axe":"B141_515_G"},{"axe":"B141B_515"},{"axe":"B141B_515_G"},{"axe":"B164_613"},{"axe":"B164_613_G"},{"axe":"B220_7"},{"axe":"B220_7_G"},{"axe":"B223_G_37"},{"axe":"B225A_613"},{"axe":"B226_515"},{"axe":"B226_515_G"},{"axe":"B235_562"},{"axe":"B235_562_G"},{"axe":"B262_579"},{"axe":"B35_514"},{"axe":"B35C_514"},{"axe":"B36B_8"},{"axe":"B400_400_G"},{"axe":"B400_400_G-2"},{"axe":"B401_60"},{"axe":"B401_60_G"},{"axe":"B403_Cites"},{"axe":"B403_G_Eglise"},{"axe":"B407_512"},{"axe":"B407_512_bis"},{"axe":"B511_613"},{"axe":"B511_613_G"}],"columns":[{"name":"axe"}]}
    Thanks for your help

  2. #2
    Sencha User
    Join Date
    Oct 2007
    Posts
    89

    Default

    In chrome and IE, I have this error:

    Cannot read property 'parentNode' of undefined in Ext.view.NodeCache


    Code:
    scroll: function(newRecords, direction, removeCount) {
            var me = this,
                elements = me.elements,
                recCount = newRecords.length,
                i, el, removeEnd,
                newNodes,
                nodeContainer = me.view.getNodeContainer(),
                frag = document.createDocumentFragment();
    
            
            if (direction == -1) {
                for (i = (me.endIndex - removeCount) + 1; i <= me.endIndex; i++) {
                    el = elements[i];
                    delete elements[i];
                    el.parentNode.removeChild(el);
                }

  3. #3
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Does your AmGetAxisList.aspx script handle properly handle the arguments being passed to it when buffering the store, such as 'page', 'start', 'limit', etc.?

Similar Threads

  1. Replies: 2
    Last Post: 10 Oct 2013, 2:18 AM
  2. Can't get infinite scroll to work
    By kashtanoff in forum Ext: Q&A
    Replies: 1
    Last Post: 15 Aug 2013, 2:50 PM
  3. Replies: 4
    Last Post: 22 Apr 2013, 9:06 AM
  4. ExtJS4.2 - Infinite Grid + Filters won't work
    By timTaylor in forum Ext: Q&A
    Replies: 1
    Last Post: 21 Mar 2013, 6:34 AM
  5. Infinite scroll table dont work.
    By Forn in forum Ext: Q&A
    Replies: 1
    Last Post: 4 Sep 2012, 6:33 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
  •