public class DelayedAdaptor : DataAdaptor { private IEnumerable Data { get; set; } = new List() {
new Row { Col1 = "test", Col2 = "tset" }, new Row { Col2 = "test", Col1 = "tset" } };
public async override Task|
<SfSpinner @bind-Visible="show" Target="container"></SfSpinner>
//set your target based on your requirement
<SfGrid @ref="Grid" TValue="Row" ID="Grid" AllowSorting="true" AllowFiltering="true" AllowPaging="true"
Toolbar="@(new List<string>() { "Add", "Delete", "Edit","Update", "Cancel" })">
<GridEvents TValue="Row" OnActionBegin="ActionBegin" OnActionComplete="ActionComplete"></GridEvents>
</GridColumns>
</SfGrid>
@code{
public async Task ActionBegin(ActionEventArgs<Row> args)
{
if (args.RequestType.Equals(Syncfusion.Blazor.Grids.Action.Save))
{
show = true;
await Task.Delay(5000);
}
}
public async Task ActionComplete(ActionEventArgs<Row> args)
{
if (args.RequestType.Equals(Syncfusion.Blazor.Grids.Action.Save))
{
show = false;
}
}
}
|