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

Dynamically Loaded Tabs + ScrollChildren = Error

5 Answers 68 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Seth
Top achievements
Rank 1
Seth asked on 11 Mar 2014, 03:01 PM
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!

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 12 Mar 2014, 05:05 AM
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.
0
Eirik Hoem
Top achievements
Rank 1
answered on 12 Mar 2014, 10:32 PM
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)



0
Nencho
Telerik team
answered on 17 Mar 2014, 11:28 AM
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.

 
0
VK
Top achievements
Rank 1
answered on 23 Jun 2014, 06:37 PM
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.
0
VK
Top achievements
Rank 1
answered on 23 Jun 2014, 09:43 PM
I figured it out, I had an open div tag in my user control sitting inside the pageview.
Tags
TabStrip
Asked by
Seth
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Eirik Hoem
Top achievements
Rank 1
Nencho
Telerik team
VK
Top achievements
Rank 1
Share this question
or