I have a gridview, I want to display in Master-Child mode. But the performance is really bad when loading data. I added BeginUpdate/EndUpdate before and after I want to load or modify some binding data. But I get the following error randomly after I modify my data several times.
It is very like that after I called BeginUpdate, and the binding data has some properties value are changed before I call EndUpdate, the error will appear very common.
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 29 Jul 2019, 11:05 AM
Hello, Haibing,
When RadGridView is populated with data and you update a certain cell/row, the grid will update its layout. The more edit operations occur, the more visual updates will be performed. This will inevitably affect performance. In such cases, it is good to use Begin/EndUpdate in order to reduce the visual refresh of RadGridView to one time. However, it is not recommended to use it when setting the DataSource for example because in the Begin/EndUpdate block, the notifications in RadGridView will be suspended.
Note that most of the forum threads are reviewed by Telerik representatives and sometimes we address the questions asked by our customers in the forums as well. However, a post in the forum doesn't guarantee you a response from the Telerik support team. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread. Thank you for your understanding.
I hope this information helps.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.
I am also encountering the same intermittent 'object reference not set' issue when reloading data on a main form that has the DataSource assignment within a Begin/EndUpdate block.
My data takes a bit to get pulled and I noticed the Begin/EndUpdate block seems to improve visual performance on the first load. However, it looks like I have to abandon that approach as a subsequent data reload could trigger the said error caused by the TableElement evaluating to nothing (and I am not sure why).
Is there another alternative aside from the load-on-demand you suggested? My dataset does not have a master-child relationship so that approach is also not relevant in my case.
Thank you,
Sid
Dess | Tech Support Engineer, Principal
Telerik team
commented on 30 Aug 2022, 12:44 PM
Hi, Sid,
According to the provided information, it wouldn't be easy to determine what causes the error on your end. That is why I would recommend you to submit a support ticket from your Telerik account providing a sample runnable project that demonstrates the issue you are facing. Thus, we would be able to get better understanding of the precise case and think about an appropriate solution. Thank you in advance for your cooperation.