The Syncfusion® native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
To be 100% sure it was not a third party library conflict, I created a simple test page with only ej2.js and ej css., result is almost the same. DataSource gets called 2 times, and it still gets called on resizes. Here below, the source code generated for the test page:
Removed test page source code, as I found the cause of the problem:
.HideAtMedia()
If I remove the HideAtMedia property the Datasource gets called only once, correctly.
How can I prevent this to happen?
DRDhivya Rajendran Syncfusion Team March 15, 2018 12:42 PM UTC
Hi Daniele,
Thanks for contacting Syncfusion support,
We have analyzed your query, We confirmed that the issue with “DataSource called more times when enable HideAtMedia property” is a defect and we have logged a defect report. The fix for this issue is estimated to be available in our upcoming release.
Regards, R.Dhivya
DADanieleMarch 15, 2018 03:13 PM UTC
Hello, thanks for your support.
After a little more investigation done before your reply, I've found out that the Datasource is always called 2 times at page load (1 correctly, 1 for the hideAtMedia bug) and an extra 3rd time is caused by the localization: After loading the required .json cldr files
document.addEventListener('DOMContentLoaded', function () {
ej.base.setCulture('it');
});
causes an extra call to the datasource.
Moving it outside the DOMContentLoaded (or jquery's document.ready()), does not cause the extra call.
Can you check it?
Thank you
RURamdhas Ueikattan Syncfusion Team March 16, 2018 12:49 PM UTC
Hi Daniele,
Thanks for your update.
We have validated your query. While you calling the ‘setCulture’ method the syncfusion components have refreshed to adopt the culture changes. The grid doesn’t persist the dataSource value in refreshing so that the grid calls DataSource method for changing the culture value.