Page numbering not working in Maui #512

Closed
opened 2026-01-29 17:38:27 +00:00 by claunia · 5 comments
Owner

Originally created by @julianadormon on GitHub (Aug 15, 2022).

Describe the bug
Page numbering buttons is incorrect on load and after switching pages.

To Reproduce
Steps to reproduce the behavior:
Steps to reproduce the behavior:
Create a DataGrid with paging.
Ensure you have multiple pages.
Load the component and see.

Expected behavior
To see multiple pages and the correct page showing

Desktop (please complete the following information):
Mac Catalyst and Windows
Same details I provided in the other bug report I created right before this one.

I have also tried with and without PageSizeOptions

`@using SortedDesktopForShootproof.Data
@using Radzen
@using System.Text.Json
@inject AppStateService AppStateService
@inject NotificationService _notificationService

<div class="flexCenter" style="align-items: center; margin-right:10px; min-width:500px; max-width: 70vw;">

    <RadzenDataGrid Style="height: calc(100% - 247px)"
                    AllowFiltering="false"
                    FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive"
                    AllowPaging="true"
                    PageSizeOptions="pageSizeOptions"
                    ShowPagingSummary="true"
                    PagingSummaryFormat="pagingSummaryFormat"
                    AllowSorting="true"
                    Data="@availableCustomers"
                    TItem="CustomerVm"
                    SelectionMode="DataGridSelectionMode.Single"
                    RowSelect=@((x) => SelectCustomer(x))>
        <Columns>
            <RadzenDataGridColumn TItem="CustomerVm" Property="UserProfile.FirstName" Title="FirstName" />
            <RadzenDataGridColumn TItem="CustomerVm" Property="UserProfile.LastName" Title="LastName" />
            <RadzenDataGridColumn TItem="CustomerVm" Property="UserProfile.FullName" Title="FullName" />
            <RadzenDataGridColumn TItem="CustomerVm" Property="UserProfile.Email" Title="Email" />
            <RadzenDataGridColumn TItem="CustomerVm" Property="UserProfile.Mobile" Title="Mobile" />
        </Columns>
    </RadzenDataGrid>

</div>
@code {

    [CascadingParameter] BlazoredModalInstance ModalInstance { get; set; }

    [Parameter] public List<CustomerVm> availableCustomers { get; set; }

    IEnumerable<int> pageSizeOptions = new int[] { 2, 10, 20, 30, 40, 50 };
    string pagingSummaryFormat = "On page {0} of {1} (total {2} records)";

    protected override void OnInitialized()
    {
        AppStateService.OnChange += StateHasChanged;
    }

    public void Dispose()
    {
        AppStateService.OnChange -= StateHasChanged;
    }


    void SelectCustomer(CustomerVm customer)
    {
        if (customer != null)
        {
            AppStateService.selectedCustomerIdToConnect = customer.CustomerId;
        }

        ModalInstance.CloseAsync(ModalResult.Ok($"Form was submitted successfully."));
    }


    public void ShowNotification(NotificationMessage message)
    {
        _notificationService.Notify(message);
    }

}

`

Originally created by @julianadormon on GitHub (Aug 15, 2022). <!-- IMPORTANT: Read this first!!! 1. If you own a Radzen Professional or Еnterprise subscription you can report your issue or ask us a question via email at info@radzen.com. Radzen staff will reply within 24 hours (Professional) or 16 hours (Enterprise) 2. The Radzen staff guarantees a response to issues in this repo only to paid subscribers. 3. If you have a HOW TO question start a new forum thread in the Radzen Community forum: https://forum.radzen.com. Radzen staff will close issues that are HOWTO questions. 4. Please adhere to the issue template. Specify all the steps required to reproduce the issue or link a project which reproduces it easily (without requiring extra steps such as restoring a database). --> **Describe the bug** Page numbering buttons is incorrect on load and after switching pages. **To Reproduce** Steps to reproduce the behavior: Steps to reproduce the behavior: Create a DataGrid with paging. Ensure you have multiple pages. Load the component and see. **Expected behavior** To see multiple pages and the correct page showing **Desktop (please complete the following information):** Mac Catalyst and Windows Same details I provided in the other bug report I created right before this one. I have also tried with and without PageSizeOptions `@using SortedDesktopForShootproof.Data @using Radzen @using System.Text.Json @inject AppStateService AppStateService @inject NotificationService _notificationService <div class="scrollDiv" style="width:1000px"> <div class="flexCenter" style="align-items: center; margin-right:10px; min-width:500px; max-width: 70vw;"> <RadzenDataGrid Style="height: calc(100% - 247px)" AllowFiltering="false" FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive" AllowPaging="true" PageSizeOptions="pageSizeOptions" ShowPagingSummary="true" PagingSummaryFormat="pagingSummaryFormat" AllowSorting="true" Data="@availableCustomers" TItem="CustomerVm" SelectionMode="DataGridSelectionMode.Single" RowSelect=@((x) => SelectCustomer(x))> <Columns> <RadzenDataGridColumn TItem="CustomerVm" Property="UserProfile.FirstName" Title="FirstName" /> <RadzenDataGridColumn TItem="CustomerVm" Property="UserProfile.LastName" Title="LastName" /> <RadzenDataGridColumn TItem="CustomerVm" Property="UserProfile.FullName" Title="FullName" /> <RadzenDataGridColumn TItem="CustomerVm" Property="UserProfile.Email" Title="Email" /> <RadzenDataGridColumn TItem="CustomerVm" Property="UserProfile.Mobile" Title="Mobile" /> </Columns> </RadzenDataGrid> </div> </div> @code { [CascadingParameter] BlazoredModalInstance ModalInstance { get; set; } [Parameter] public List<CustomerVm> availableCustomers { get; set; } IEnumerable<int> pageSizeOptions = new int[] { 2, 10, 20, 30, 40, 50 }; string pagingSummaryFormat = "On page {0} of {1} (total {2} records)"; protected override void OnInitialized() { AppStateService.OnChange += StateHasChanged; } public void Dispose() { AppStateService.OnChange -= StateHasChanged; } void SelectCustomer(CustomerVm customer) { if (customer != null) { AppStateService.selectedCustomerIdToConnect = customer.CustomerId; } ModalInstance.CloseAsync(ModalResult.Ok($"Form was submitted successfully.")); } public void ShowNotification(NotificationMessage message) { _notificationService.Notify(message); } } `
Author
Owner

@julianadormon commented on GitHub (Aug 15, 2022):

Here is another video using a different component. Thanks!
https://www.loom.com/share/0ca6adc1c26142c0a89b7392a84285c5

@julianadormon commented on GitHub (Aug 15, 2022): Here is another video using a different component. Thanks! https://www.loom.com/share/0ca6adc1c26142c0a89b7392a84285c5
Author
Owner

@enchev commented on GitHub (Aug 16, 2022):

Hey @julianadormon,
We will need runnable code that reproduces the problem. Please try to reproduce it in a self contained example and post it here. You can use also our demos to try to replicate your scenario.

@enchev commented on GitHub (Aug 16, 2022): Hey @julianadormon, We will need runnable code that reproduces the problem. Please try to reproduce it in a self contained example and post it here. You can use also our demos to try to replicate your scenario.
Author
Owner

@julianadormon commented on GitHub (Aug 16, 2022):

Ok, I may need some time to put a repo together. Thanks.

@julianadormon commented on GitHub (Aug 16, 2022): Ok, I may need some time to put a repo together. Thanks.
Author
Owner

@julianadormon commented on GitHub (Aug 16, 2022):

Here is a minimal repo.
https://github.com/julianadormon/RadzenPageNumberBug.git

@julianadormon commented on GitHub (Aug 16, 2022): Here is a minimal repo. https://github.com/julianadormon/RadzenPageNumberBug.git
Author
Owner

@julianadormon commented on GitHub (Aug 16, 2022):

https://www.loom.com/share/830fef21793c4f36be727f5742205f6a

@julianadormon commented on GitHub (Aug 16, 2022): https://www.loom.com/share/830fef21793c4f36be727f5742205f6a
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#512