Binding DataGridSettings loop indefinitely when using LoadData #723

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

Originally created by @chouteau on GitHub (Feb 8, 2023).

When using RadzenDataGrid with @bind-Settings="MyProperty" and LoadData="MyLoadDatas" it loop on MyLoadDatas indefinitely.

Because setter of Settings property of RadzenDataGrid call the Reload method when settings assessor is null

if (settings != value)
{
    settings = value;
    if (settings == null)
    {
        canSaveSettings = false;
        Groups.Clear();
        CurrentPage = 0;
        skip = 0;
        Reset(true);
        allColumns.ToList().ForEach(c =>
        {
            c.SetVisible(true);
        });
        columns = allColumns.Where(c => c.Parent == null).ToList();
        InvokeAsync(Reload); // <------------------------------------------ Here 
        canSaveSettings = true;
    }
}

Is it possible to have a public method that returns DataGridSettings value "GetDataGridSettings" and "Set..." ?

Originally created by @chouteau on GitHub (Feb 8, 2023). When using RadzenDataGrid with @bind-Settings="MyProperty" and LoadData="MyLoadDatas" it loop on MyLoadDatas indefinitely. Because setter of Settings property of RadzenDataGrid call the Reload method when settings assessor is null ```c# if (settings != value) { settings = value; if (settings == null) { canSaveSettings = false; Groups.Clear(); CurrentPage = 0; skip = 0; Reset(true); allColumns.ToList().ForEach(c => { c.SetVisible(true); }); columns = allColumns.Where(c => c.Parent == null).ToList(); InvokeAsync(Reload); // <------------------------------------------ Here canSaveSettings = true; } } ``` Is it possible to have a public method that returns DataGridSettings value "GetDataGridSettings" and "Set..." ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#723