1. #1
    Sencha User
    Join Date
    Oct 2012
    Location
    India
    Posts
    15
    Vote Rating
    1
    Answers
    1
    saurabh0683 is on a distinguished road

      0  

    Default Answered: making Grid autosroll not working

    Answered: making Grid autosroll not working


    Hi,

    I wanted to make grid autoscroll and here is the code snippet i wrote:
    // some code...
    Grid<Task> grid = new Grid<Task>(store, model);
    grid.getElement().setScrollTop(30);
    // some code...

    same thing works for ListView but not with Grid. Any suggestions??

  2. my mistake
    found solution:

    grid.addBodyScrollHandler(new BodyScrollHandler() {
    public void onBodyScroll(BodyScrollEvent event) {
    grid2.getView().getScroller().setScrollTop(event.getScrollTop());
    }
    });

  3. #2
    Sencha User
    Join Date
    Oct 2012
    Location
    India
    Posts
    15
    Vote Rating
    1
    Answers
    1
    saurabh0683 is on a distinguished road

      0  

    Default


    my mistake
    found solution:

    grid.addBodyScrollHandler(new BodyScrollHandler() {
    public void onBodyScroll(BodyScrollEvent event) {
    grid2.getView().getScroller().setScrollTop(event.getScrollTop());
    }
    });