How to check the maximum value of Scrollbar in Panel?

Answered
0
0

Good morning, I would like to do a simple check. I wanted to know when the user scrolls and reaches the maximum of the scrollbar, because I’m doing an SQL, and every time the user reaches the limit of the scrollbar I want to add more items to the Panel. I would like to have something of the genre:
if Panel1.Scrollbars.MaximumValue = e.NewValue then
‘if the scrollbar is at its maximum then…
End If

 

If anyone knows of a way to do this in VB.NET on WiseJ I would really appreciate it, thank you very much.

  • You must to post comments
Great Answer
0
0

This is a lazy loading panel sample:

https://wisej.com/support/question/lazy-loading-panel

You need to change it from Wisej 1.5 to Wisej 2.x.

There is no max value available for the internal scrollbars, it’s available for the ScrollBar control.

As the example shows, you can check the ScrollEventType in the Scroll event: if (e.Type == ScrollEventType.Last)…

https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.scrolleventtype

  • You must to post comments
0
0

Hi Ruben,

You should check out the DataRepeater control. It features templating & Virtual Mode (https://docs.wisej.com/docs/controls/lists/datarepeater). VirtualMode allows you to specify your own data management system. Basically, you need to implement ItemUpdate, ItemValueNeeded, etc. It helps a lot when working with large datasets as you only render a few visible records on the client at a time.

You can check the scroll position of a Panel with this.panel1.VerticalScroll.Value.

 

HTH,

Levie

 

  • ruben ribeiro
    Hi Levie! Im sorry but thats not really what i need, i need this to work in a flow layout panel, and i need to get the current scrollbat value adn the max scrollbar value.
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.