X.PagedList icon indicating copy to clipboard operation
X.PagedList copied to clipboard

Infinite Scroll

Open hn1 opened this issue 3 years ago • 6 comments

Is there any way to use this control with an Infinite Scroll script? Has anyone tried it or are there any examples? Thanks

hn1 avatar Apr 25 '21 21:04 hn1

Hi,

i have done this with troygoodies version in previous mvc 5 project, its actually pretty simple to do... so what you have to do this is following:

  1. generate paged data in a partial view or action or view component(in case of net core version)
  2. hide the paging pagination control simply using css display:none
  3. use javascript and ajax call once user comes into the end of viewport or element
  4. simply invoke next action link when in viewport
  5. grab ajax response and populate below the current div or block (in jquery you use append)
  6. repeat same

hope you understand the point..

aloksharma1 avatar May 11 '21 08:05 aloksharma1

Hi Thanks for your response. Greatly appreciated. Is there any way of configuring the pager with just a next button without the other buttons as that is the only button required for such UI.

Or infact, one does not need the pager at all. Just a simple link pointing to the next page.

Many thanks

On Tue, May 11, 2021 at 9:37 AM Alok Sharma @.***> wrote:

Hi,

i have done this with troygoodies version in previous mvc 5 project, its actually pretty simple to do... so what you have to do this is following:

  1. generate paged data in a partial view or action or view component(in case of net core version)
  2. hide the paging pagination control simply using css display:none
  3. use javascript and ajax call once user comes into the end of viewport or element
  4. simply invoke next action link when in viewport
  5. grab ajax response and populate below the current div or block (in jquery you use append)
  6. repeat same

hope you understand the point..

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dncuug/X.PagedList/issues/208#issuecomment-838078094, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACA6J2IHN5N5ZC5PKB423G3TNDUDLANCNFSM43RWQVCA .

hn1 avatar May 11 '21 11:05 hn1

Hi By the way I tried it with the X.PagedList and it does not work. I think it might have to do with the way it wraps everything in the page with a single container.

On Tue, May 11, 2021 at 12:54 PM H Nahavandi @.***> wrote:

Hi Thanks for your response. Greatly appreciated. Is there any way of configuring the pager with just a next button without the other buttons as that is the only button required for such UI. Many thanks

On Tue, May 11, 2021 at 9:37 AM Alok Sharma @.***> wrote:

Hi,

i have done this with troygoodies version in previous mvc 5 project, its actually pretty simple to do... so what you have to do this is following:

  1. generate paged data in a partial view or action or view component(in case of net core version)
  2. hide the paging pagination control simply using css display:none
  3. use javascript and ajax call once user comes into the end of viewport or element
  4. simply invoke next action link when in viewport
  5. grab ajax response and populate below the current div or block (in jquery you use append)
  6. repeat same

hope you understand the point..

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dncuug/X.PagedList/issues/208#issuecomment-838078094, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACA6J2IHN5N5ZC5PKB423G3TNDUDLANCNFSM43RWQVCA .

hn1 avatar May 12 '21 18:05 hn1

if you can upload a sample repo, i can do the changes to make it work containers are no issue you just need to make your js logics for taking care of the issue, sorry dont have time to upload my own... as for the buttons yes you only need next but i just used boilerplate as its hidden i dont care about it. but you can choose to do a custom pager implementation if you just want next button to render (i simply hides it for simplicity).

aloksharma1 avatar May 12 '21 18:05 aloksharma1

Thanks. Do you know of any samples somewhere where I can take a look?

On Wed, May 12, 2021 at 7:39 PM Alok Sharma @.***> wrote:

if you can upload a sample repo, i can do the changes to make it work containers are no issue you just need to make your js logics for taking care of the issue, sorry dont have time to upload my own... as for the buttons yes you only need next but i just used boilerplate as its hidden i dont care about it. but you can choose to do a custom pager implementation if you just want next button to render (i simply hides it for simplicity).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dncuug/X.PagedList/issues/208#issuecomment-840011629, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACA6J2JK3FP7PW5FRVHWRQDTNLDNVANCNFSM43RWQVCA .

hn1 avatar May 12 '21 18:05 hn1

maybe you can use this :https://infinite-scroll.com/

aloksharma1 avatar May 13 '21 10:05 aloksharma1