I need to create a custom SfGrid, so I made a class CustomGrid that inherits SfGrid :
public class CustomGrid<T> : SfGrid<T>
{
...
}
How can I tap into GridEvents.OnActionBegin to execute some code ? I tried this but you can’t assign a function to an EventCallback
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
GridEvents.OnActionBegin += ActionHandler;
}
await base.OnAfterRenderAsync(firstRender);
}
public async Task ActionHandler(ActionEventArgs<T> Args)
{
if (Args.RequestType == Syncfusion.Blazor.Grids.Action.Sorting)
{
Console.WriteLinte("Sorting");
}
}