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

How to set the Grid page number when the current page is empty #443

Closed
IvoVentura142 opened this issue Nov 30, 2023 · 0 comments · Fixed by #1059
Closed

How to set the Grid page number when the current page is empty #443

IvoVentura142 opened this issue Nov 30, 2023 · 0 comments · Fixed by #1059
Labels
area-grid bug Something isn't working
Milestone

Comments

@IvoVentura142
Copy link

IvoVentura142 commented Nov 30, 2023

Describe the bug
I have a grid with multiple pages of records, and when I'm on some page ex: page 12 and remove all the items from that page, the page is empty but the grid doesn't navigate to the previous page.

I'm using Server Side Filtering and paging, how can I force the grid to change to the previous page and show that page as selected on the grid pagination.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the page with the grid
  2. Navigate to the grids last page
  3. Remove all the items from that grid page

Expected behavior
I expect the "active" page number to change to the previous page number (if any page remains)

Screenshots
Page 12 has 1 Item:
image

I remove that Item
image

As you can see the page is empty.

Versions

  • BlazorBootstrap: 1.10.4
  • Blazor WebAssembly / Server: Server
  • .NET Version: .NET 7
@gvreddy04 gvreddy04 added this to the 3.4.0 milestone Mar 14, 2025
@gvreddy04 gvreddy04 added the bug Something isn't working label Mar 14, 2025
gvreddy04 added a commit to rajraku/blazorbootstrap that referenced this issue Mar 14, 2025
gvreddy04 added a commit that referenced this issue Mar 14, 2025
* Added a field to Grid data result to use the new page number when the skip value is greater than or equal to total available value

* Updated the Grid to apply the new page number if available

* Updated the example to validate the change

* #689, #443 - Demos updated

---------

Co-authored-by: Raj Kumar Sri Ramulu <[email protected]>
Co-authored-by: Vikram Reddy <[email protected]>
@gvreddy04 gvreddy04 linked a pull request Mar 14, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-grid bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants