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
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.
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
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
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
very very thank
Hi Ali,
Welcome. Please get back to us if you have further queries. As always we will be happy to assist you.
Regards,
Monisha