Hi Daniel,
Thanks for contacting Syncfusion support.
Query: “I have made a CustomAdaptor for my Blazor WebAssembly project, the problem is the ReadAsync event is never being fired.”
We have analyzed the reported issue with the provided sample and we are able to reproduce the reported issue at our end also. This is because you have defined an empty overridden OnInitializedAsync lifecycle method which causes the further action from proceeding. Hence the reported issue also occurred. Kindly modified the code as below to resolve the reported issue.
Also return the data from ReadAsync in form of DataResult to bind the data properly in Grid. Refer the below modified code example.
|
protected override Task OnInitializedAsync()
{
return base.OnInitializedAsync();
}
public override async Task<object> ReadAsync(DataManagerRequest dataManagerRequest, string key = null)
{
List<Usuario> lst = new List<Usuario>();
lst.Add(new Usuario() { Id = 2 });
Console.WriteLine("ReadAsync was Fired");
return dataManagerRequest.RequiresCounts ? new DataResult() { Result = lst, Count = lst.Count } : (object)lst;
}
|
Please find the modified sample from below
Please get back to us if you have further queries.
Regards,
Vignesh Natarajan