DataGrid databinding double call

Hi.


In the data grid, data binding is performed for each specific situation, and the function of the javascript is called only once normally, but the call is made twice in the data binding code belonging to the function. I'm attaching a video and a source because I'm not sure if you can understand what I'm saying.


If you look at the video, the debugging point is easily passed once at first, but only 'Grid.dataSource = newej.data.DataManager({' is read once more without the debugging point being crossed at once.


This phenomenon does not occur only on the page in the video, but the same phenomenon occurs on all pages of the project. I would appreciate it if you could let me know the solution as soon as possible.


Attachment: DataGrid_Databinding_double_call_a9ddc9d3.zip

1 Reply

PS Pavithra Subramaniyam Syncfusion Team June 16, 2022 06:46 AM UTC

Hi TaeWook Kang,


Thanks for contacting Syncfusion support.


In your demo, we could see that you are setting the grid dataSource property which will trigger the change detection and send a data fetching call. Also, you are calling the “refresh” method which will also send the call and refresh the whole Grid UI. This is the reason for two data fetching calls in your sample. So, we suggest removing the “Grid.refresh();” code inside the “tabChange” method.


Please get back to us if you need further assistance on this.


Regards,

Pavithra S


Loader.
Up arrow icon