InteractiveServerRenderMode prerendering true Datagrid data pre-loading #5305
Unanswered
renebrandnewday
asked this question in
Q&A
Replies: 1 comment
-
Hello @renebrandnewday This is Blazor specific. Let us know if this helps |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
What I try to achieve is to load my data as soon as possible, so the initial rendering of the page is fastest.
I was wondering if there is something I can do better.. I have spend quite some time on it and I am convinced I do something wrong.
The most successful attempt is with InteractiveServerRenderMode prerendering false. Using the OnInitializedAsync method to start loading data into a variable asap, while the page rendering continues. I am setting the data with Data="@DaTa" in the control. I don't set the OnRead method, now.. The results is not as fast as with prerendering true, but it doesn't load data twice.
So, I have to set the InteractiveServerRenderMode prerendering to false, because otherwise the grid data is load twice. Once for the initial rendering, second for the websockets stuff..
It empties the grid and reloads the data again when the websockets thread is handled.. very visible in the browser.
InteractiveServerRenderMode prerendering to true had the fastest rendering results, and was perfect. But reloading data in the grid is not ok. Super confusing.. What is the correct way to start loading data before the grid is rendered with prerendering to true?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions