Skip to content

Commit

Permalink
Fixed "The ParameterView instance can no longer be read because it ha…
Browse files Browse the repository at this point in the history
…s expired." error with virtualized DropDownDataGrid
  • Loading branch information
enchev committed Nov 5, 2024
1 parent 2429b2c commit 8bebd19
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Radzen.Blazor/RadzenDropDownDataGrid.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ protected override async Task OnDataChanged()
if (!LoadData.HasDelegate)
{
searchText = null;
await OnLoadData(new Radzen.LoadDataArgs() { Skip = 0, Top = PageSize });
await OnLoadData(new Radzen.LoadDataArgs() { Skip = 0, Top = PageSize, OrderBy = "" });
}
}

Expand All @@ -412,7 +412,7 @@ public override async Task SetParametersAsync(ParameterView parameters)

if (!string.IsNullOrEmpty(searchText) && !LoadData.HasDelegate)
{
await OnLoadData(new Radzen.LoadDataArgs() { Skip = skip, Top = PageSize });
await OnLoadData(new Radzen.LoadDataArgs() { Skip = skip, Top = PageSize, OrderBy = "" });
}
}

Expand All @@ -422,7 +422,7 @@ public override async Task SetParametersAsync(ParameterView parameters)
public async Task Reload()
{
searchText = null;
await OnLoadData(new Radzen.LoadDataArgs() { Skip = 0, Top = PageSize });
await OnLoadData(new Radzen.LoadDataArgs() { Skip = 0, Top = PageSize, OrderBy = "" });
}

private string GetPropertyFilterExpression(string property, string filterCaseSensitivityOperator)
Expand All @@ -447,7 +447,7 @@ private bool IsColumnFilterPropertyTypeString(RadzenDataGridColumn<object> colum
}

string prevSearch;
string prevOrder;
string prevOrder = "";
int? skip;
async Task OnLoadData(LoadDataArgs args)
{
Expand Down Expand Up @@ -669,7 +669,7 @@ async System.Threading.Tasks.Task Clear()
await grid.SelectRow(null);
}

await OnLoadData(new Radzen.LoadDataArgs() { Skip = 0, Top = PageSize });
await OnLoadData(new Radzen.LoadDataArgs() { Skip = 0, Top = PageSize, OrderBy = "" });

StateHasChanged();
}
Expand Down

0 comments on commit 8bebd19

Please sign in to comment.