Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: extjs4.0.7 infinite grid looses data while scrolling

  1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    59
    Answers
    2

    Default Answered: extjs4.0.7 infinite grid looses data while scrolling

    I do have an infinite Grid with {xtype: 'rownumberer',width: 50,sortable: false} at the first column.
    If I scroll down, so the first row gets out of view and if I then scroll up again, the row #1 will not be shown anymore and i can't scroll up further ... ???



    Does anyone know a Bugfix for this?

    (can't upgrade the project to ext 4.1.1)
    new to ExtJS

  2. FIXED!!!!!!!!!!!!!!!!!!


    PHP Code:
                this._store.on('load',function()
                {
                    
    //console.log('on load',arguments);
                    
    var grid Ext.getCmp('mygrid');
                    if(
    grid)
                    {
                        
    grid.view.scrollByDelta(-1000);
                    }
                }); 
    found the scrollByDelta function by playing around ...
    Now, even if I scroll to record 400 und then up, the grid starts with record #1

  3. #2
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,102
    Answers
    113

    Default

    the row is still there; the scrollbar is somehow broken on scrolling. I had the same problem. If you click on the record which you now see on top and move up the selection using the cursor (arrow) keys, you can again see it. I struggled with it but couldnt find a solution. may be you can try something like selecting the first record:

    Code:
    grid.getSelectionModel().select(0);
    or redoing the layout of the grid or rendering it again somehow...

  4. #3
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,410
    Answers
    716

    Default

    Scrolling in 4.07 (virtual) was a hot mess. The best solution would be to upgrade. If you simply cannot, try the option above, your you may simply have to create an override that suits your needs.

    Scott.

  5. #4
    Sencha User
    Join Date
    Jan 2012
    Posts
    59
    Answers
    2

    Default

    Hi there :-)

    Thanks, but all actions are ignored. I've tried:

    PHP Code:
                this._store.on('load',function()
                {
                    
    console.log('on load',arguments);
                    var 
    grid Ext.getCmp('mygrid');
                    if(
    grid)
                    {
                        
    grid.invalidateScrollerOnRefresh true;
                        
    grid.view.refresh();
                        
    grid.getSelectionModel().select(0);
                    }
                }); 
    but nothing helps. Strangely the LOAD event is only fired, if the scroller reaches the top (or what the scroller thinks the top may be). Seems to be a bug, because the whole infinite grid only fires kinds of PREFETCH events.
    It also doesn't work if I select the 2nd record and use the up-cursor. The selection goes out of view, is still there because if I go down with the cursor, the selection is visible again. But the scroller doesn't change and the grid-view also.
    new to ExtJS

  6. #5
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,102
    Answers
    113

    Default

    If the grid has rowediting/cellediting plugin, and then you move the selection up and press Enter to activate it, then I guess the first row would show but this wouldn't help you any way...

    I discussed this at length in the Premium Forums but couldn't get it working. They suggested me to upgrade (which wasn't possible for me) or use paging (which I had to do at the end). Also, the rendering of the grid was quite slow when the number of records was increased to some thousands. It would take quite some seconds and every time the user would edit something in the grid, it would again take many seconds...

  7. #6
    Sencha User
    Join Date
    Jan 2012
    Posts
    59
    Answers
    2

    Default

    Hi Farish,
    these are REALLY BAD news! What arguments are left to tell a customer in such a Situation?
    It seems very risky to me to use ExtJS on commercial Projects.
    Do you know any method to tell the whole grid & store to refresh from 'new'?
    grid.view.refresh() doesn't have any affect.
    new to ExtJS

  8. #7
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,102
    Answers
    113

    Default

    what if you reload the store? it might work although with a lot of requests and responses sent back and forth...

    if you cannot get it to work, then go for paging. thats what I did at last. how many records do you have to show at a time?

  9. #8
    Sencha User
    Join Date
    Jan 2012
    Posts
    59
    Answers
    2

    Default

    I tried to reload the store at the 'LOAD' event but it ends up in an infinite prefetch-loop.
    I don't really want to use paging. It should be a high quality reference Project, which shows possibilities of almost perfect data handling for the user. My paging size for now is set to 100 records.
    new to ExtJS

  10. #9
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,102
    Answers
    113

    Default

    you shouldnt call load on load event. you should call it when the problem with the scrollbar appears but i dont know what event this would be! unfortunately, I cant help you with this.

  11. #10
    Sencha User
    Join Date
    Jan 2012
    Posts
    59
    Answers
    2

    Default

    That was also my thought and I also do have no Idea, 'what' tells me that the scrollbar is 'on top' :-)
    Thank you anyway for trying me to help!
    In between I took a look at sencha's example of the infinite grid (4.0.7) and it comes up with the same error.
    new to ExtJS

Page 1 of 2 12 LastLast

Posting Permissions

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