Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination Not Working #33

Closed
AndyEV opened this issue Aug 28, 2017 · 5 comments
Closed

Pagination Not Working #33

AndyEV opened this issue Aug 28, 2017 · 5 comments

Comments

@AndyEV
Copy link

AndyEV commented Aug 28, 2017

So I've installed the library in my application and configured just as directed both in the read me and sample project, I went on bringing in the sample paging controller inside my project with the view to test the library and everything was just responding as expected. Now, I'm pulling data from database, making sure everything is in the same picture like the paging controller and all I can see is my data table no display of any pagination beneath the table and the code is there with every thing well set but still nothing is coming up for pagination. My data is showing with my filter box ontop but pagination isn't responding but it working fine with the sample paging controller I added to the project.

My project is on Dotnet core 1.1

What could be the problem? there's no error per say.

Just found out that the pagination tag helper isn't rendering, the div closing it is empty.

@joeaudette
Copy link
Collaborator

sorry for some reason I did not get email notification of this issue and just noticed it.

Did you add this in your _ViewImports.cshtml file as indicated in the readme?

@addTagHelper "*, cloudscribe.Web.Pagination"

@joeaudette
Copy link
Collaborator

if you continue having trouble please post more details about how you are using it ie your markup.

It will only render if the total item count is higher than the page size, ie if there are more pages of data.

@AndyEV
Copy link
Author

AndyEV commented Aug 30, 2017

Okay, yes I did so I finally found a way to make it work.

So if am using cs-paging-info="@Model.Paging" it doesn't work but if am braking it down like this
cs-paging-pagesize="@Model.PageSize" cs-paging-pagenumber="@Model.PageNumber" cs-paging-totalitems="@Model.TotalItemCount"
the above works perfectly well...

@joeaudette
Copy link
Collaborator

sounds like your paging model was not populated correctly in the controller action, I use it all the time, but fine to use the individual params instead. closing this issue since it is working for you.

@Pinski
Copy link

Pinski commented Sep 8, 2017

@AndyEV
If cs-paging-pagesize="@Model.PageSize" works then cs-paging-info="@Model" should work too, right? It seems the model you are using on that page is the PaginationSettings class directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants