RadzenDataGrid Settings: SettingsChanged gets an incorrect CurrentPage value #1031

Open
opened 2026-01-29 17:48:05 +00:00 by claunia · 0 comments
Owner

Originally created by @aplib on GitHub (Nov 5, 2023).

Describe the bug

The SettingsChanged event handler receives an incorrect CurrentPage value after a page change:

To Reproduce

Add code to Edit Source on DataGrid Pager API ad display the @current_page value it on the page. We will see different values of the current page in the variable and the current pagers page number on the screen.

 int? current_page;
protected override void OnAfterRender(bool firstRender)
{
    if (firstRender)
    {
        dataGrid.SettingsChanged = new EventCallback<DataGridSettings>(this, async (DataGridSettings settings) =>
	{
            current_page = settings.CurrentPage;
	});
    }
    base.OnAfterRender(firstRender);
}

Expected behavior

The values must be the same.

Originally created by @aplib on GitHub (Nov 5, 2023). **Describe the bug** The SettingsChanged event handler receives an incorrect CurrentPage value after a page change: **To Reproduce** Add code to Edit Source on [DataGrid Pager API](https://blazor.radzen.com/datagrid-pager-api) ad display the @current_page value it on the page. We will see different values of the current page in the variable and the current pagers page number on the screen. ``` int? current_page; protected override void OnAfterRender(bool firstRender) { if (firstRender) { dataGrid.SettingsChanged = new EventCallback<DataGridSettings>(this, async (DataGridSettings settings) => { current_page = settings.CurrentPage; }); } base.OnAfterRender(firstRender); } ``` **Expected behavior** The values must be the same.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1031