Saved views: "Input string was not in a correct format" when filtering on Int32

2 posts, 0 answers
  1. jelling
    jelling avatar
    13 posts
    Member since:
    Aug 2006

    Posted 16 Aug 2010 Link to this post

    I have setup my page to load and save views. This works fine for the most part but when I reload a view where I've filtered on an integer column I get the error below. Note: the filter works  when you create it, it's just when it's reloaded from the db. Other saved views such as text matches work also after reloading so it appears to just be integer comparisons.

    Is there an internal build that fixes this issue? I am scheduled to release on Wednesday and we just discovered this.


    Input string was not in a correct format.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.FormatException: Input string was not in a correct format.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [FormatException: Input string was not in a correct format.]
       System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +9594283
       System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119
       System.String.System.IConvertible.ToInt32(IFormatProvider provider) +46
       System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) +385
       System.Convert.ChangeType(Object value, Type conversionType) +32
       Telerik.Web.UI.RadFilterNonGroupExpression.ParseValue(Object value) +186
       Telerik.Web.UI.RadFilterSingleValueExpression`1.Telerik.Web.UI.IRadFilterValueExpression.SetValues(ArrayList values) +68
       Telerik.Web.UI.RadFilter.FetchExpressionsValues(RadFilterGroupExpressionItem group) +273
       Telerik.Web.UI.RadFilter.HandleApplyCommand() +38
       Telerik.Web.UI.RadFilter.FireApplyCommand() +135
       vquality_vqualitytopics.rcbCustomViews_SelectedIndexChanged(Object o, RadComboBoxSelectedIndexChangedEventArgs e) +130
       Telerik.Web.UI.RadComboBox.OnSelectedIndexChanged() +192
       Telerik.Web.UI.RadComboBox.RaisePostDataChangedEvent() +26
       Telerik.Web.UI.RadDataBoundControl.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent() +10
       System.Web.UI.Page.RaiseChangedEvents() +134
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5201
    
  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 19 Aug 2010 Link to this post

    Hello Jon,

    Can you please verify that the column you are formatting is of the proper DataType? This should ensure that the filtered values will be formatted properly. You can review the Description section of this online example along with the help article linked in it for more details:
    http://www.telerik.com/demos/aspnet/Grid/Examples/Client/ColumnFormatting/DefaultCS.aspx

    Regards,
    Pavlina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top