Author Topic: How to perform auto vertical scrolling in angularjsgrid?  (Read 3245 times)

pravin

  • Newbie
  • *
  • Posts: 3
    • View Profile
How to perform auto vertical scrolling in angularjsgrid?
« on: January 12, 2017, 02:02:36 pm »
i am populating the angularjs  grid  with records fetched from server, as and when the rows are rendered i want the grid should show the latest record.
The vertical scroll should be made to be positioned at the end. how can i achieve this. Please help.
in simple terms how can i programatically scroll to the end?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: How to perform auto vertical scrolling in angularjsgrid?
« Reply #1 on: January 12, 2017, 07:31:07 pm »
Please check this.

http://jsfiddle.net/nspd5f8j/

Code: [Select]
          var $pqScrollbar = $grid.find(".pq-vscroll").pqScrollBar();         
         
          $pqScrollbar.pqScrollBar("option", "ratio", 1).pqScrollBar('scroll');
         
          $grid.pqGrid('refresh');

pravin

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: How to perform auto vertical scrolling in angularjsgrid?
« Reply #2 on: January 12, 2017, 09:01:13 pm »
Thank you , but i need the solution in angularjs pq-grid.
Could you please translate the same solution for the angularjs pq-grid?

-Pravin

pravin

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: How to perform auto vertical scrolling in angularjsgrid?
« Reply #3 on: January 15, 2017, 08:41:42 pm »
Dear admin,
i am evaluating the angularjs variant of the Paramquery grid, and badly
need a way to programatically scroll the vertical scrollbar to the end when new records are fetched from server.
i tried everything but couldn't find a way to achieve this.
Please suggest some solution.

Thanks,
Pravin.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: How to perform auto vertical scrolling in angularjsgrid?
« Reply #4 on: January 17, 2017, 05:36:16 pm »
Working example is already shared in previous post. You can use that code in appropriate directive or event.

One more example of programatically scrolling the grid ( for Pro version ) is here: http://paramquery.com/pro/demos/scroll