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

InvalidCastException on RadNumericTextBox

1 Answer 215 Views
This is a migrated thread and some comments may be shown as answers.
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
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:

Best wishes,
the Telerik team

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