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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

binding grid to custom objects with nullable properties

Thread ID:





37908 Dec 1,2005 10:56 PM UTC Dec 2,2005 10:00 AM UTC WinForms 1
Tags: GridControl
David Woodstrom
Asked On December 1, 2005 10:56 PM UTC

I am binding a generic list of custom objects to a GridGroupingControl. Several of the properties on the custom object have nullable types. When the grid displays, there are two columns showing for each property on the object. For instance, instead of seeing a ProductID column, there is a ProductID_HasValue column and a ProductID_Value column. How can I bind to these objects and still have the columns displayed as they would be if the properties were not nullable. I assume that there might be a way using a CustomTypeDescriptor but have not been able to figure it out. Thanks


Administrator [Syncfusion]
Replied On December 2, 2005 10:00 AM UTC

Thank you for your sample. It looks like Convert.ChangeType in the .NET framework 2.0 does surprisingly not work with Nullable types and will throw an exception once you call it with a nullable type. This is why this particular problem is occurring. Our development team has worked around this problem in our code base, and this correction will be in the upcoming 4.1 release. If you would like access to a intermediate build before the release, submit a direct trac support incident requesting one, and we will try to accomodate you in some manner. I think the 4.1 release will be mid Dec time frame.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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