1. #1
    Ext User
    Join Date
    Sep 2010
    Posts
    2
    Vote Rating
    0
    nukusmaximus is on a distinguished road

      0  

    Default GridView refresh event not firing properly

    GridView refresh event not firing properly


    Hello everyone

    Hope someone can help me with this problem. I have created a locking grid and the effect I want to achieve is to have the grid scroll to the right when it refreshes. However, the refresh event seems to be triggered too early...it always reset the scrollbar back to the left after the refresh happens. Is there a way to override this behaviour?

    My grid creation code looks like this:

    grid = new Ext.grid.GridPanel({
    store: store,
    colModel: new Ext.ux.grid.LockingColumnModel(columns),
    enableColumnResize: false,
    enableColumnMove: false,
    enableColumnHide: false,
    enableHdMenu: false,
    selModel: new Ext.grid.RowSelectionModel({ singleSelect: true }),
    view: new Ext.ux.grid.LockingGridView()
    });
    and my event handler is like this

    grid.getView().on("refresh", function (v) { v.scroller.dom.scrollLeft = 10000; });
    I can get it to work with a little trick, by delaying this function by about 1 sec...

    grid.getView().on("refresh", function (v) { setTimeout(function () { v.scroller.dom.scrollLeft = 10000; }, 1000); });
    but its not an elegant solution and don't know if it will work on all browsers and the 1 sec delay is noticeable though bearable.

    Any help would be greatly appreciated.

    Thanks

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    Try:
    Code:
    view: new Ext.ux.grid.LockingGridView({
      scrollToTop: Ext.emptyFn
    })

  3. #3
    Ext User
    Join Date
    Sep 2010
    Posts
    2
    Vote Rating
    0
    nukusmaximus is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    Try:
    Code:
    view: new Ext.ux.grid.LockingGridView({
      scrollToTop: Ext.emptyFn
    })
    Cool! works like a charm! Thanks Condor.

Similar Threads

  1. GridView refresh row
    By micgala in forum Ext GWT: Help & Discussion (1.x)
    Replies: 7
    Last Post: 21 Jun 2011, 11:01 AM
  2. GridView Refresh el is undefined
    By koenyn in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 5 Jul 2010, 11:32 PM
  3. AggragationRows in GridView do not align properly
    By chun.xu in forum Ext GWT: Discussion
    Replies: 0
    Last Post: 26 Jan 2010, 7:09 PM
  4. [2.2] GridView not firing rowsinserted event
    By andrew.howard@gtri.gatech.edu in forum Ext 2.x: Bugs
    Replies: 10
    Last Post: 23 Jul 2009, 8:08 AM

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar