We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Syncfusion Bug Or blazor error ?

Hi

There is an extra loop in some of your components

An example of a datagrid:

When creating a column in the datagrid, the command is executed three times.

It seems that its child components call statechanged

Suppose we want to make many columns by loops. This is a problem and it lowers performance. How can we prevent loops or code from running randomly?

I have sent a sample video and example. thank you


Attachment: Video_f7709cb1.zip


5 Replies 1 reply marked as answer

MS Monisha Saravanan Syncfusion Team October 17, 2022 12:22 PM UTC

Hi Ali,


Greetings from Syncfusion support.


Query: “When creating a column in the datagrid, the command is executed three times.”


We have checked your query and prepared an sample as per your shared codes from the video demonstration. But we could not able to reproduce the reported issue at our end. So Before proceeding further 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 Nuget version used at your end.
  3. Share us whether you have performed any refresh or any external action in Grid before rendering.
  4. If possible kindly share us the simple issue reproduceable sample or modify the reported issue on the below mentioned sample.


Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/DataGrid-445658730.zip


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



AL ali October 17, 2022 06:06 PM UTC

hi Monisha

I sent the test project with a video .

When I run it, the number 1 is printed three times in the console Also, the example you sent shows the number 1 twice. What is the reason?


Attachment: BlazorApp_ace5d26d.zip



MS Monisha Saravanan Syncfusion Team October 18, 2022 12:53 PM UTC

Hi Ali,


Thanks for the update.


Query: “When I run it, the number 1 is printed three times in the console Also, the example you sent shows the number 1 twice. What is the reason?”


We would like to inform that due to server pre-rendering the component is rendered once and after the data source is fetched it will re-render again. So the console is printed twice in our shared sample and this is the default behavior of DataGrid and in your shared sample we could see that GridPageSettings is enabled and we have rendered pager as an separate component so it is rendered once again in your shared sample.


Please let us know if you have any concerns


Regards,

Monisha


Marked as answer

AL ali October 18, 2022 11:12 PM UTC

very very thank



MS Monisha Saravanan Syncfusion Team October 19, 2022 02:49 PM UTC


Hi Ali,


Welcome. Please get back to us if you have further queries. As always we will be happy to assist you.


Regards,

Monisha


Loader.
Live Chat Icon For mobile
Up arrow icon