Percentage Numeric Textbox: Binding ofset value gives invalid cast exception

2 posts, 1 answers
  1. Richard
    Richard avatar
    4 posts
    Member since:
    Apr 2013

    Posted 29 Apr 2013 Link to this post

    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?
  2. Answer
    Angel Petrov
    Admin
    Angel Petrov avatar
    1006 posts

    Posted 02 May 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top