Welcome to the Blazor feedback portal. We’re happy you’re here! If you have feedback on how to improve the Blazor, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
I've discovered what seems to be a problem when SfGrid enumerates a data source. In our case it is quite costly.
If we provide an IEnumerable<T> data source and in there we pull "chunks" of data at a time and yield the individual items from each chunk. The control seems to begin enumerating several times (pulling the first item) before eventually enumerating the data.
So in our case it causes a chunk of 100 items to be pulled form the server, then enumerates just the first item from that and does that several times. The it enumerates all the data again correctly. The displayed results are fine, the extraneous pulls it does at the beginning do not get displayed so the appearance is not at fault.
Under the hood our data is pulled in chunks until there are no more chunks, here is a simplified representation of this:
private IEnumerableTestConfigurationItems()
{for (int I=0; I < 10; I++)
{// Do possibly expensive IO here, then enumerate the results
for (int Y=0; Y < 10; Y++)
{ yield return new Definition() { Description = "test", Name = $"{I}.{Y}", Scope = "Test", ConfigId = new Guid() };}
}
}
The outer loop represents the "chunk pulling" and the inner loop represents the yielding of individual items from a chunk.