Grid toolbar definition code executing 12 times on page load

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



6 Replies

MS Monisha Saravanan Syncfusion Team June 28, 2022 11:54 AM UTC

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



MS Monisha Saravanan Syncfusion Team June 30, 2022 11:53 AM UTC

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.


  1. Share us the entire Grid code snippet along with model class.
  2. Share us the Syncfusion Nuget version used.
  3. Share us the video demonstration of the issue.
  4. If possible kindly share us the issue reproduceable sample or try to reproduce the reported issue on the above mentioned sample.


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



SZ SZL June 30, 2022 03:41 PM UTC

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ó


Attachment: link_dcaa5df5.zip


MS Monisha Saravanan Syncfusion Team July 1, 2022 01:14 PM UTC

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



SZ SZL July 4, 2022 06:40 AM UTC

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,




MS Monisha Saravanan Syncfusion Team July 5, 2022 01:41 PM UTC

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


Loader.
Up arrow icon