Hello,
I have this Blazor Grid code:
<SfGrid ID="Grid"
@ref="PrimaryGrid"
TValue="ProjektFejListItemDto"
AllowPaging="true"
AllowFiltering="true"
AllowReordering="true"
AllowResizing="true"
AllowSorting="true"
AllowExcelExport="true"
AllowPdfExport="true"
ShowColumnChooser="true"
Toolbar="@GetPrimaryGridToolbarItemsDemo()"
Height="100%"
Width="100%">
The backend code:
public List<Object> GetPrimaryGridToolbarItemsDemo()
{
ConsoleDev.WriteLine("Toolbar code executed!");
return new();
}
I attach an image from the browser console and you can see that the above message appear 12 times during 1 page load.
Can you explain please why this happen and how can I avoid this?
Thank you very much!
BR, SZL
Hi SZL,
Greetings from Syncfusion support.
Currently we are validating your query at our end and we will update further details within two business days on or before (30.06.2022). Until then we appreciate your patience.
Regards,
Monisha
Hi SZL,
Thanks for the patience.
We have checked your query and prepared an sample based on your shared code snippet. But we could not able to replicate the reported issue at our end. Kindly check the attached sample and video demo for your reference.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/DataGrid-2090518678.zip
Video: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Video2138119349.zip
If the reported issue still persists then kindly share the below details to validate further at our end.
The above-requested details will be very helpful for us to validate the reported query at our end and provide the solution as early as possible.
Regards,
Monisha
Hello,
After half day I succeed to reproduce the problem in my cleared solution.
I attach a link in a zip file to download the solution.
Sorry for the design, but I think is not relevant for this problem.
When you start the Server project and open the browser console you can see that the toolbar method executing 4 times.
I cannot reproduce why in my full project executing 12 times, but I think this 4 will be also a good starting point.
Thanks for help!
BR,
László
Hi SZL,
Thanks for the update.
We have analyzed your query and we could able to reproduce the reported issue at our end by using the provided sample. Before proceeding further with your requirement kindly share us whether you are facing any performance delay or any other issues due to the reported behavior.
The above-requested details will be very helpful for us to validate the reported query at our end and provide the solution as early as possible.
Regards,
Monisha
Hi,
I not feel performance delay at runtime, but this is not a normal behavior, so it can be a start-point of an another problem in the future.
Best Regards,
Hi SZL,
Thanks for the update.
Query: “I not feel performance delay at runtime, but this is not a normal behavior, so it can be a start-point of an another problem in the future.”
We have checked your reported issue and we are able to reproduce the same reported issue in custom component also by using your shared sample. So we would like to inform that the issue is not reproduced from SfGrid component and it is calling from framework. We have attached the modified sample. Kindly refer the Fetchdata.razor page for your reference.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/FOMENU~11062260651.zip
Kindly get back to us if you have further queries.
Regards,
Monisha