We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to resolve Null reference exception in the GGC while changing the DataSource in the ComboBox RecordValueChanged event?

While changing the DataSource in the ComboBox cell, a null reference exception is raised. This is because the database is updated and then refreshed after you pick a value from a ComboBox cell by using the RecordValueChanged event. The newly edited value is not committed while the database updates. So, when you try to click on the next row, the RecordValueChanged event refreshes the database before the ComboBox commits the new value into the underlying database.

 

 

Figure 1: Null reference exception

This can be solved by calling the EndEdit() in the TableControlCurrentCellCloseDropDown event. Refer to the following code example.

C#

 

VB

Sample Links:

C#: ChangingDataSource-C#

VB: ChangingDataSource-VB

Article ID: Published Date: Last Revised Date: Platform: Control:
4676 04/22/2015 04/23/2015 WinForms GridGroupingControl
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon