Skip to main content
1-Visitor
January 24, 2017
Solved

how to make the service know the page(grid widget) has scrolled to the bottom

  • January 24, 2017
  • 5 replies
  • 3456 views

   Hello everyone,

  

   I  use  an AutoRefresh widget and a  custom service (The service just accumulates and return a number,  the resulting number is  bind to the ScrollTop attribute to make the page(grid widget) scroll down every  ten seconds, everything is OK, but I wanna do some action  when the page(grid widget) has scrolled to the bottom (can't scroll down anymore ). I don't know how to make the service know the page(grid widget) has scrolled to the bottom.


         if anyone have some idea, please help me, thanks.

Best answer by jkaczynski

Hello,

There's no such OOTB function. To achieve the behavior like that, you need to make a small workaround.

Every grid has outbound property CurrentScrollTop (in pixels). So you know, that the end of the grid is reached, if CurrentScrollTop = ~((number_of_rows x row_height) - (number_of_displayed_rows * row_height)). That assumes that you know the number of rows in the IT and number of displayed rows.

Thanks and for you also - Happy New Year.

Regards,

J.

5 replies

1-Visitor
January 24, 2017

Hello,

Already responded in the other topic, but to make sure you noticed:

Hi,

Every service has event that is invoked when the invokation is finished - ServiceInvokeCompleted. If you need to chain any action after your service, it's a good place to start. The rest depends on your needs and what do you want to achieve.

To find this evet, just click on your service in the Mashup Builder - in the right bottom pane there are service properties and so the event,

Regards,

J.

贾良_011-VisitorAuthor
1-Visitor
January 24, 2017

Hi  Jakub ,

         Very thanks for your advice, but I  don't want do something when the invokation is finished, because the service may be invoked many times, only when the page(grid widget) has scrolled to the bottom to do some actions(such as redirect to another page). Chinese New Year is coming, Wish you a happy New Year.

1-Visitor
January 24, 2017

Hello,

There's no such OOTB function. To achieve the behavior like that, you need to make a small workaround.

Every grid has outbound property CurrentScrollTop (in pixels). So you know, that the end of the grid is reached, if CurrentScrollTop = ~((number_of_rows x row_height) - (number_of_displayed_rows * row_height)). That assumes that you know the number of rows in the IT and number of displayed rows.

Thanks and for you also - Happy New Year.

Regards,

J.