This is a migrated thread and some comments may be shown as answers.

getting casting error on nullable System.Int64 in RadNumericTextBox

2 Answers 112 Views
Input
This is a migrated thread and some comments may be shown as answers.
EJ
Top achievements
Rank 1
EJ asked on 04 Jun 2010, 11:24 AM
when i use data binding on a objectdatasource entity framework field that is a nullable system64 i get a casting error - is there any tips on handling nullable types for microsoft databinding on this control?

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 04 Jun 2010, 02:11 PM
Hello,

With RadNumericTextbox, use the DbValue property rather than the Value property. The "Db" properties differ from the counterparts you usually use in that they do not throw an exception if the new value is null, string, or DBNull. Setting a DbNull value will internally revert the DbNull to an empty value.

You can refer the following documentation for more information.
Using RadInput Controls Inside Data-Bound Controls




Thanks,
Princy.
0
EJ
Top achievements
Rank 1
answered on 07 Jun 2010, 09:45 PM
that did it - thanks!
Tags
Input
Asked by
EJ
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
EJ
Top achievements
Rank 1
Share this question
or