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

Percentage Numeric Textbox: Binding ofset value gives invalid cast exception

1 Answer 85 Views
Input
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 29 Apr 2013, 06:41 PM
I have the same issue as in this thread: http://www.telerik.com/community/forums/aspnet-ajax/input/percentage-numerictextbox-possible-bind-display-format-difference.aspx

I followed the last example and created a new control and it works fine as long as there is data.

My issue is that I have values that are stored as 0. It is a sql float (vb.net Single) data type and will not store 0 as 0.0, so it returns 0. I can't bind to the dbValue in this case.

Is there a way to work around this issue?

1 Answer, 1 is accepted

Sort by
0
Accepted
Angel Petrov
Telerik team
answered on 02 May 2013, 01:32 PM
Hi Richard,

You can workaround this issue by parsing the Single value to a Double. A sample demonstration on how this can be achieved is shown in the project attached.

Regards,
Angel Petrov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Input
Asked by
Richard
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Share this question
or