Base solution for your next web application
Open Closed

Building a pagerViewComponent (Jquery + AspNetCore) #5695


User avatar
0
sbenfares created

Hi,

I would like to build a PagerViewComponent for getting my data paginated in ANZ / ABP, and reuse this component.

I don't want to use Datatables, because my view is not meant to display table rows.

Do you have any sample or documentation for this ?

I think it would be useful for other ANZ users.

Thanks


4 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @sbenfares

    We don't have a sample for this, maybe other AspNet Zero users can share their experience.

  • User Avatar
    0
    mumfie created

    This is one I have used in the past https://github.com/dncuug/X.PagedList

  • User Avatar
    0
    sbenfares created

    Thanks @mumfie, how do you deal with Automapper & ViewModel ?

    I have my AppService which returns IPagedList<MyDto>

    And then i follow the X.PagedList sample and put this list in viewBag (instead of ViewModel it's bad i think) but i never cast it to a Model.

    Thanks for your help

  • User Avatar
    0
    sbenfares created

    I found myself a solution, i"ve created a ViewModel which contains a IPagedList<MyDto> property.

    Thanks for your help