Hi, I'm new to Radzeb Blazor Studio.
I'm doing my first simple app with two tables, Persons and Clubs.
I build it and tested do add a clubb but when a click Save i would like to empty the form and refresh the grid (list) that does not happen.
Is there somthing I missed?
Hi @VictorW60,
Indeed at the moment the form isn't cleared after clicking the save button. If you want to clear it you should add some code in the FormSubmit method:
protected RBSServer.Models.RadzenSample.Product product;
protected async Task FormSubmit()
{
try
{
var result = isEdit ? await RadzenSampleService.UpdateProduct(product.Id, product) : await RadzenSampleService.CreateProduct(product);
// Initialize a new instance of the model with default values
product = new RBSServer.Models.RadzenSample.Product();
}
catch (Exception ex)
{
errorVisible = true;
}
}
In this example product
is the name generated for the entity by Radzen Blazor Studio.