I am using SfDataPager for performance improvements in DataGrid. I need to add about 1000 items in 100ms and this causes some freezing. The freezing issue with pagination has been resolved. But when I call MoveToLastPage after every addition, it still freezes. I wanted to use View.BeginInit but it doesn't seem to work if I use pagination.
We are a little unclear about your scenario, we are unable to reproduce the reported issue with the provided detail on our end. Here we have attached the tested sample. Please have a look at this. If you are still facing the reported issue, please share the below things,
Provide the entire code snippets that related to the SfDataGrid both XAML and the code behind.
Can you please share your exact requirement?
Provide a replication procedure with a video illustration of the reported issue
Modify the attached sample based on your scenario
It will be helpful for us to check on it and provide you with a solution as soon as possible.
I've read in the docs to use sfDataGrid.View.BeginInit() for performance in bulk inserts and sfDataGrid.View.EndInit() after adding data. Unfortunately it doesn't work when used with DataPager. I've included an example below. Thanks for your help.
We have investigated the problem you reported and reviewed the details you provided. The paging feature is a performance-enhancing way to display large amounts of data in the UI. Normally, the UI updates for each and every change that occurs in the view. By using SfDataGrid.View.BeginInit and SfDataGrid.View.EndInit methods, you can restrict the UI updates and improve the performance. However, in the case of paging, you do not need to call these methods to improve performance.
We have modified the sample according to your scenario of adding 1000 records and calling MoveLastPage without using the aforementioned methods, but we did not encounter any UI freezing issues. We have attached the modified sample for your reference. Please review it and see if it helps resolve your issue. If you are still experiencing problems, please modify the attached sample to match your scenario, and provide us with a video illustration of the reported issue. This will enable us to investigate the issue further and provide you with a solution as soon as possible.