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. Image for the cookie policy date

PercentTextBox - handling null values

I''m trying to figure out how to get the PercentTextBox to handle null values from my dataset. If I create a databinding to a field in my DataRow and the field value is null, I get a " Object cannot be cast from DBNull to other types." Is there a special property I should set on this control to allow it to handle null values bound to it? I''d think the expected behavior would be to either show 0.00 % or just an empty text box. Thanks!

5 Replies

AD Administrator Syncfusion Team September 21, 2004 07:01 PM

Hi, Thanks for your feedback on this issue. I do see this problem here, and have consulted the development team for their inputs on this issue. I will keep you posted on this. We appreciate your patience and cooperation. Regards, Guru Patwal Syncfusion, Inc.


PL Paul Laudeman September 22, 2004 05:18 AM

This problem also appears with the DateTime control (again, unless I''m configuring the control wrong). The best work around I have now is just to display a default value (via the Binding Format event). This isn''t always the best solution, because we''d like to force the user to either enter what would be a default value (for a value type), or just clear out the box if they explicitly want the field to have no value. Thanks, and keep me posted! -Paul >Hi, > >Thanks for your feedback on this issue. I do see this problem here, and have consulted the development team for their inputs on this issue. I will keep you posted on this. We appreciate your patience and cooperation. > >Regards, >Guru Patwal >Syncfusion, Inc.


AD Administrator Syncfusion Team September 22, 2004 08:03 PM

Hi Paul, We have now added a BindablePercentValue property to the PercentTextBox that can support databinding to DBNull values as well. Presently this feature is still internal, and is expected to be incorporated in the next release of Essential Suite (post v2.1.0.9 releases). I will test the DateTimePickerAdv for this issue and will get back to you on this as soon as possible. We appreciate your continued interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.


PL Paul Laudeman September 24, 2004 07:35 AM

Thanks for the update, Guru. We''re presently on build past the latest public release, and are upgrading frequently for some other new features. If you could email me privately and let me know when these are implemented, we might get the new functionality in our next private release. Thanks! -Paul >Hi Paul, > >We have now added a BindablePercentValue property to the PercentTextBox that can support databinding to DBNull values as well. Presently this feature is still internal, and is expected to be incorporated in the next release of Essential Suite (post v2.1.0.9 releases). I will test the DateTimePickerAdv for this issue and will get back to you on this as soon as possible. We appreciate your continued interest in Syncfusion products. > >Regards, >Guru Patwal >Syncfusion, Inc.


AD Administrator Syncfusion Team September 27, 2004 03:17 PM

Hi Paul, Please create an incident in Direct-Trac and I will update you with more information in this regard. Also, the DateTimePickerAdv works fine when databound to a DataSource that contains null values. Make sure that you use its BindableValue property for the databinding. Please refer to the test sample attached that illustrates this,and let me know if you need further assistance. Thanks for choosing Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Loader.
Live Chat Icon For mobile
Up arrow icon