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

InvalidCastException on RadNumericTextBox

1 Answer 136 Views
Input
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 22 Sep 2008, 03:51 PM
I'm running into a problem with the RadNumericTextBox which is proving extraordinarily difficult to reproduce. The situation is that my company has built a web application which we host. On a given page which has a little over a half dozen RadNumericTextBox controls including a few that are part of a RadGrid which is itself in a PanelBar.

When I navigate to the given page from IE7 or FF3, I can see it fine. However, when the user navigates to the page in IE7 (we don't know about FF yet), it throws the following error:

  System.InvalidCastException: Text property cannot be set. Input string was not in a correct format.
    at Telerik.Web.UI.RadNumericTextBox.RangeTextProperty(String value)
    at Telerik.Web.UI.RadNumericTextBox.set_Text(String value)
    at MySpiffyNamespace.MyPage.BindData()
    at MySpiffyNamespace.MyPage.OnLoad(EventArgs e)
    at System.Web.UI.Control.LoadRecursive()
  at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

I cannot believe the problem is related to data because if I navigate to the same page with the same data, it works fine. It must be some sort of browser permission issue or perhaps it is related to culture? The users in question are in the Netherlands but the app was developed in the US however we do not yet have anything cost that is culture specific.

1 Answer, 1 is accepted

Sort by
0
Missing User
answered on 24 Sep 2008, 07:17 AM
Hello Thomas,

With RadNumericTextbox, use the DbValue property rather than Value or Text properties.

You can review the following help article:
http://www.telerik.com/help/aspnet-ajax/input_commondatabinding.html

Best wishes,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Input
Asked by
Thomas
Top achievements
Rank 1
Answers by
Missing User
Share this question
or