Dynamically Loaded Tabs + ScrollChildren = Error

6 posts, 0 answers
  1. Seth
    Seth avatar
    66 posts
    Member since:
    Oct 2009

    Posted 11 Mar 2014 Link to this post

    I am experiencing an error with dynamically loaded tabs and pageviews when I enable ScrollChildren.

    When the page loads, I can click on any of the tabs and it dynamically loads each pageview just fine.  But once I scroll it throws up a big nasty exception:

    "Unhandled exception at line 15, column 9936 in http://localhost:56040/Web/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=rsmDetail_TSM&compress=1&_TSM_CombinedScripts_=;;System.Web.Extensions,+Version=3.5.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:en-US:eb198dbd-2212-44f6-bb15-882bde414f00:ea597d4b:b25378d2;Telerik.Web.UI,+Version=2013.3.1114.35,+Culture=neutral,+PublicKeyToken=121fae78165ba3d4:en-US:3e277e38-c51f-44dd-a424-df507d29c5b5:16e4e7cd:86526ba7:874f8ea2:f7645509:24ee1bba:1e771326:88144a7a:a7e79140:e330518b:8e6f0d33:6a6d718d:f46195d3:19620875:cda80b3:ed16cbdc:92fe8ea0:fa31b949:490a9d4e:bd8f85e4:11a04f7e:58366029:b7778d6c

    0x800a139e - JavaScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: -38.960000000000036 is not a valid value for Int32."

    I have not created a sample application that replicates the issue.  Any feedback would be appreciated!
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 12 Mar 2014 in reply to Seth Link to this post

    Hi Seth,

    I followed your scenario and created a sample code for you and I am not getting any error. Please take a look into the code snippet which works fine at my end.

    ASPX:
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1"
        ScrollButtonsPosition="Left" Width="400px" ScrollChildren="true">
    </telerik:RadTabStrip>
    <telerik:RadMultiPage ID="RadMultiPage1" runat="server">
    </telerik:RadMultiPage>

    C#:
    protected void Page_Init(object sender, EventArgs e)
    {
        for (int i = 0; i < 10; i++)
        {
            RadTab tab1 = new RadTab();
            tab1.Text = "Tabtrip"+i;
            RadPageView pageview = new RadPageView();
            pageview.ID = "PageView" + i; ;
            pageview.ContentUrl = "AddUserControlPageView.aspx";
            RadMultiPage1.PageViews.Add(pageview);
            tab1.PageViewID = pageview.ID;
            RadTabStrip1.Tabs.Add(tab1);
        }
    }

    Let me know if you have any concern.
    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Eirik Hoem
    Eirik Hoem avatar
    1 posts
    Member since:
    Jun 2009

    Posted 12 Mar 2014 in reply to Shinu Link to this post

    I have a similar problem which appeared after upgrading to Telerik v. 2013.3.1114.45 from v. 2012.3.1205.45. A tabstrip being created dynamically like this:

                CommonTabStrip = new RadTabStrip();
                CommonTabStrip.EnableEmbeddedSkins = false;
                CommonTabStrip.ID = "CvContentTabStrip";
                CommonTabStrip.SkinID = "WcTabStrip";
                CommonTabStrip.ApplyStyleSheetSkin(this.Page);
                CommonTabStrip.AutoPostBack = true;
                CommonTabStrip.CausesValidation = false;
                CommonTabStrip.EnableViewState = false;
                CommonTabStrip.ScrollChildren = true;
                CommonTabStrip.Width = 950;
                CommonTabStrip.ScrollButtonsPosition = TabStripScrollButtonsPosition.Right;
                CommonTabStrip.PerTabScrolling = false;
                CommonTabStrip.TabClick += new RadTabStripEventHandler(CvContentTabStrip_TabClick);

    I have more tabs than what fits in the page width, so the scroll buttons appear. But at the same time the tabs are wrapped, so I both get the scroll buttons AND two rows of tabs. When I click on various tabs, sometimes only one row is displayed, sometimes two. After some clicks, the application crashes with the following error message below (the negative number varies). When I set ScrollChildren = false, the application does not crash.

    System.Exception: System.Exception: -126.01999999999998
    is not a valid value for Int32. ---> System.FormatException: Input string
    was not in a correct format.

       at
    System.Number.StringToNumber(String str, NumberStyles options,
    NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)

       at
    System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)

       at
    System.ComponentModel.Int32Converter.FromString(String value, NumberFormatInfo
    formatInfo)

       at
    System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext
    context, CultureInfo culture, Object value)

       --- End of inner
    exception stack trace ---

       at
    System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext
    context, CultureInfo culture, Object value)

       at
    System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object
    o, Type type, JavaScriptSerializer serializer, Boolean throwOnError,
    Object& convertedObject)

       at
    System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object
    o, Type type, JavaScriptSerializer serializer, Boolean throwOnError,
    Object& convertedObject)

       at System.Web.Script.Serialization.ObjectConverter.ConvertDictionaryToObject(IDictionary`2
    dictionary, Type type, JavaScriptSerializer serializer, Boolean throwOnError,
    Object& convertedObject)

       at
    System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object
    o, Type type, JavaScriptSerializer serializer, Boolean throwOnError,
    Object& convertedObject)

       at
    System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object
    o, Type type, JavaScriptSerializer serializer, Boolean throwOnError,
    Object& convertedObject)

       at
    System.Web.Script.Serialization.ObjectConverter.AssignToPropertyOrField(Object
    propertyValue, Object o, String memberName, JavaScriptSerializer serializer,
    Boolean throwOnError)

       at
    System.Web.Script.Serialization.ObjectConverter.ConvertDictionaryToObject(IDictionary`2
    dictionary, Type type, JavaScriptSerializer serializer, Boolean throwOnError,
    Object& convertedObject)

       at
    System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object
    o, Type type, JavaScriptSerializer serializer, Boolean throwOnError,
    Object& convertedObject)

       at
    System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object
    o, Type type, JavaScriptSerializer serializer, Boolean throwOnError,
    Object& convertedObject)

       at
    System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String
    input)

       at
    Telerik.Web.UI.RadTabStrip.LoadPostData(String postDataKey, NameValueCollection
    postCollection)

       at System.Web.UI.Page.ProcessPostData(NameValueCollection
    postData, Boolean fBeforeLoad)

       at
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
    Boolean includeStagesAfterAsyncPoint)I have a similar problem. A tabstrip being created dynamically



    , getting this error when 

    System.Exception: System.Exception: -126.01999999999998
    is not a valid value for Int32. ---> System.FormatException: Input string
    was not in a correct format.

       at
    System.Number.StringToNumber(String str, NumberStyles options,
    NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)

       at
    System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)

       at
    System.ComponentModel.Int32Converter.FromString(String value, NumberFormatInfo
    formatInfo)

       at
    System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext
    context, CultureInfo culture, Object value)

       --- End of inner
    exception stack trace ---

       at
    System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext
    context, CultureInfo culture, Object value)

       at
    System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object
    o, Type type, JavaScriptSerializer serializer, Boolean throwOnError,
    Object& convertedObject)

       at
    System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object
    o, Type type, JavaScriptSerializer serializer, Boolean throwOnError,
    Object& convertedObject)

       at System.Web.Script.Serialization.ObjectConverter.ConvertDictionaryToObject(IDictionary`2
    dictionary, Type type, JavaScriptSerializer serializer, Boolean throwOnError,
    Object& convertedObject)

       at
    System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object
    o, Type type, JavaScriptSerializer serializer, Boolean throwOnError,
    Object& convertedObject)

       at
    System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object
    o, Type type, JavaScriptSerializer serializer, Boolean throwOnError,
    Object& convertedObject)

       at
    System.Web.Script.Serialization.ObjectConverter.AssignToPropertyOrField(Object
    propertyValue, Object o, String memberName, JavaScriptSerializer serializer,
    Boolean throwOnError)

       at
    System.Web.Script.Serialization.ObjectConverter.ConvertDictionaryToObject(IDictionary`2
    dictionary, Type type, JavaScriptSerializer serializer, Boolean throwOnError,
    Object& convertedObject)

       at
    System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object
    o, Type type, JavaScriptSerializer serializer, Boolean throwOnError,
    Object& convertedObject)

       at
    System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object
    o, Type type, JavaScriptSerializer serializer, Boolean throwOnError,
    Object& convertedObject)

       at
    System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String
    input)

       at
    Telerik.Web.UI.RadTabStrip.LoadPostData(String postDataKey, NameValueCollection
    postCollection)

       at System.Web.UI.Page.ProcessPostData(NameValueCollection
    postData, Boolean fBeforeLoad)

       at
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
    Boolean includeStagesAfterAsyncPoint)



  5. Nencho
    Admin
    Nencho avatar
    1458 posts

    Posted 17 Mar 2014 Link to this post

    Hello Eirik,

    The experienced problematic behavior is an already fixed bug. I would suggest you to upgrade to our latest official release  - 2014 Q1 (2014.1.225), where the problem is fixed.

    Regards,
    Nencho
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
  6. VK
    VK avatar
    2 posts
    Member since:
    Aug 2006

    Posted 23 Jun 2014 in reply to Nencho Link to this post

    I was encountering the very same issue reported and upon reading this post I have upgraded to the most recent release level  (2014.2.618.45) , I still encounter the error . Any insight to the cause would be appreciated.
  7. VK
    VK avatar
    2 posts
    Member since:
    Aug 2006

    Posted 23 Jun 2014 in reply to VK Link to this post

    I figured it out, I had an open div tag in my user control sitting inside the pageview.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017