[PR #1111] [CLOSED] Added demo datagrid save settings to url #2516

Open
opened 2026-01-29 18:19:13 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/radzenhq/radzen-blazor/pull/1111
Author: @k-Sacr
Created: 8/11/2023
Status: Closed

Base: masterHead: Added-demo-datagrid-save-settings-to-url


📝 Commits (3)

  • 683b754 Added a demo example of saving datagrid settings to url query using json serialization and base64 encoding
  • 3cf13f5 Fix twice LoadData with settings.
  • 5842cb3 fix path button Reload on datagrid-save-settings-loaddata page

📊 Changes

5 files changed (+186 additions, -2 deletions)

View changed files

📝 Radzen.Blazor/RadzenDataGrid.razor.cs (+1 -1)
RadzenBlazorDemos/Pages/DataGridSaveSettingUrlLoadData.razor (+167 -0)
RadzenBlazorDemos/Pages/DataGridSaveSettingUrlLoadDataPage.razor (+9 -0)
📝 RadzenBlazorDemos/Pages/DataGridSaveSettingsLoadData.razor (+1 -1)
📝 RadzenBlazorDemos/Services/ExampleService.cs (+8 -0)

📄 Description

Added a demo example of saving datagrid settings to url query using json serialization and base64 encoding.

Fix multi LoadData with settings:

Before:
chrome_2023-08-11_17-38-42

After:
2023-08-11_17-40-17

If remove

protected override async Task OnAfterRenderAsync(bool firstRender)
{
    if (firstRender || loaded)
    {
        await LoadStateAsync();

        if (loaded)
        {
            loaded = false;
            await Task.Yield();
            await grid.Reload();
            loaded = false;
        }
    }
}

and move LoadStateAsync() to OnInitialized/OnInitializedAsync/SetParametersAsync

chrome_2023-08-11_17-50-36


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/radzenhq/radzen-blazor/pull/1111 **Author:** [@k-Sacr](https://github.com/k-Sacr) **Created:** 8/11/2023 **Status:** ❌ Closed **Base:** `master` ← **Head:** `Added-demo-datagrid-save-settings-to-url` --- ### 📝 Commits (3) - [`683b754`](https://github.com/radzenhq/radzen-blazor/commit/683b754163b5c9e198b81a1bdf6b1a41f1ec74b2) Added a demo example of saving datagrid settings to url query using json serialization and base64 encoding - [`3cf13f5`](https://github.com/radzenhq/radzen-blazor/commit/3cf13f5d39d0052183d1f58310bb8f17750d98e0) Fix twice LoadData with settings. - [`5842cb3`](https://github.com/radzenhq/radzen-blazor/commit/5842cb3e70e569572951aa42c330a7c56a34274d) fix path button Reload on datagrid-save-settings-loaddata page ### 📊 Changes **5 files changed** (+186 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `Radzen.Blazor/RadzenDataGrid.razor.cs` (+1 -1) ➕ `RadzenBlazorDemos/Pages/DataGridSaveSettingUrlLoadData.razor` (+167 -0) ➕ `RadzenBlazorDemos/Pages/DataGridSaveSettingUrlLoadDataPage.razor` (+9 -0) 📝 `RadzenBlazorDemos/Pages/DataGridSaveSettingsLoadData.razor` (+1 -1) 📝 `RadzenBlazorDemos/Services/ExampleService.cs` (+8 -0) </details> ### 📄 Description Added a demo example of saving datagrid settings to url query using json serialization and base64 encoding. Fix multi LoadData with settings: Before: ![chrome_2023-08-11_17-38-42](https://github.com/radzenhq/radzen-blazor/assets/18440948/5df76463-098a-4570-bdd4-c96c36eee2f7) After: ![2023-08-11_17-40-17](https://github.com/radzenhq/radzen-blazor/assets/18440948/430073d7-d0dd-434c-9c3c-de6837c3ba9f) If remove ``` protected override async Task OnAfterRenderAsync(bool firstRender) { if (firstRender || loaded) { await LoadStateAsync(); if (loaded) { loaded = false; await Task.Yield(); await grid.Reload(); loaded = false; } } } ``` and move LoadStateAsync() to OnInitialized/OnInitializedAsync/SetParametersAsync ![chrome_2023-08-11_17-50-36](https://github.com/radzenhq/radzen-blazor/assets/18440948/0f480cf2-4aae-4bd9-8ab2-3f9b1df89590) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 18:19:13 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#2516