Hi there, I'm having an issue with reloading the grid. I have a Radzen dialog for a user to enter a value, and then that to get loaded into the grid when the dialog is submitted.
I've got that to work when there are already values in the grid, but when the list is empty (i.e. the grid is showing 'No records to display.'), the grid doesn't reload. Debugging, I can see my empty list and my new value getting added to the list.
This is the code for my dialog and reloading the grid:
public async Task OpenAddProperty()
{
var result = await DialogService.OpenAsync(
"New Property",
parameters: new Dictionary<string, object>
{
{ "Client", client! }
},
options: new DialogOptions() { Width = "700px" });
if (result != null && propertyGrid != null && result is Property)
{
var newProperty = result as Property;
this.properties!.Add(newProperty!);
if (propertyGrid != null)
{
await propertyGrid!.Reload();
StateHasChanged();
}
}
I've tried that change, doesn't seem to make any difference, still stays at 'no records to display' on the grid until I refresh the browser. Once there are records, it works.