Results 1 to 2 of 2

Thread: making Grid autosroll not working

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Location
    India
    Posts
    15
    Answers
    1
    Vote Rating
    1
      0  

    Default 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
    Answers
    1
    Vote Rating
    1
      0  

    Default

    my mistake
    found solution:

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

Posting Permissions

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