Skip to content

Commit

Permalink
DataGrid save/load Settings for PageSize change fixed
Browse files Browse the repository at this point in the history
Fix #633
  • Loading branch information
enchev committed Oct 4, 2022
1 parent e315677 commit 3c9368b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Radzen.Blazor/PagedDataBoundComponent.cs
Expand Up @@ -311,13 +311,13 @@ protected async Task OnPageChanged(PagerEventArgs args)
await InvokeAsync(Reload);
}

int? pageSize;
internal int? pageSize;

/// <summary>
/// Called when [page size changed].
/// </summary>
/// <param name="value">The value.</param>
protected async Task OnPageSizeChanged(int value)
protected virtual async Task OnPageSizeChanged(int value)
{
pageSize = value;
await InvokeAsync(Reload);
Expand Down
10 changes: 10 additions & 0 deletions Radzen.Blazor/RadzenDataGrid.razor.cs
Expand Up @@ -2427,6 +2427,16 @@ public override void Dispose()

internal int deepestChildColumnLevel;

/// <inheritdoc />
protected override async Task OnPageSizeChanged(int value)
{
pageSize = value;

SaveSettings();

await base.OnPageSizeChanged(value);
}

/// <summary>
/// Gets DataGrid settings as JSON string.
/// </summary>
Expand Down

0 comments on commit 3c9368b

Please sign in to comment.