InvalidCastException on RadNumericTextBox

2 posts, 0 answers
  1. Thomas
    Thomas avatar
    143 posts
    Member since:
    Feb 2007

    Posted 22 Sep 2008 Link to this post

    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.

  2. Plamen Peshev
    Plamen Peshev avatar
    886 posts

    Posted 24 Sep 2008 Link to this post

    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top