We are using version 2011.3.1305.35 Telerik Ajax Controls.
System.Exception: 337.7143 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.ComponentModel.TypeConverter.ConvertFromInvariantString(String text)
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(JavaScriptSerializer
serializer, String input, Type type, Int32 depthLimit)
at
System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String
input)
at
Telerik.Web.UI.RadListBox.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)
--- End of inner
exception stack trace ---
at
System.Web.UI.Page.HandleError(Exception e)
at
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint)
at
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at
System.Web.UI.Page.ProcessRequest(HttpContext context)
at
ASP.frm_clientservices_aspx.ProcessRequest(HttpContext context)
at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously).
23 Answers, 1 is accepted
We are aware of the problem and we are working on it. Here is the public item:
http://feedback.telerik.com/Project/108/Feedback/Details/144661-fix-treeview-throws-system-formatexception-input-string-was-not-in-a-correct-f
EDIT:
Same error can be thrown if you are using RadScheduler, RadListBox, RadTreeView.
Error appears only on Google Chrome when the page is zoomed in/out.
Temporary workaround: Change the Zoom to 100%.
Regards,
Hristo Valyavicharski
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
We're also encountering the same problem with some of our clients but it's hard to fix since I cannot replicate the problem myself.
Below is the exception in our logs.
Exception information:
Exception type: Exception
Exception message: 401.6 is not a valid value for Int32.
at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at System.ComponentModel.TypeConverter.ConvertFromInvariantString(String text)
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(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)
at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String input)
at Telerik.Web.UI.RadListBox.LoadPostData(String postDataKey, NameValueCollection postCollection)
at Telerik.Web.UI.RadDataBoundControl.System.Web.UI.IPostBackDataHandler.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)
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)
Getting more reports of this now and doesn't seem to be ANYTHING I can do about it!
Can't reproduce it, can't debug it, can't workaround it. Zooming in/out doesn't make any difference.
Please can you post a workaround or at least explain (technically) what's going on here?
Chrome has started setting the scroll position as a floating point rather than an integer. RadListBox is not flooring this value before posting it back (or just parsing it as a double) which is causing a parsing exception on the server.
E.g. here's an example ClientState hidden field value after scrolling:
{"isEnabled":true,"logEntries":[{"Type":5,"Index":"12","Data":{"NewIndex":"17"}},{"Type":5,"Index":"18","Data":{"NewIndex":"9"}}],"selectedIndices":[],"checkedIndices":[12,18],"scrollPosition":36.6667}
That 36.6667 is the problem. I've worked around it by handling the RadListBox scroll event and flooring out the value before it's posted back:
$(".RadListBoxScrollable .rlbGroup").off("scroll.position-fix").on("scroll.position-fix", function () {
$(this).scrollTop(Math.floor($(this).scrollTop()));
});
I should stress I'm not 100% if this will fix it yet, I'm awaiting user feedback as I can't reproduce it myself! But I'm pretty sure it will fix the problem as the issue is clearly that the RadListBox attempts to do an int.Parse() on a floating point on postback.
Here are the workarounds for:
RadScheduler:
<script type=
"text/javascript"
>
Telerik.Web.UI.RadScheduler.prototype.saveClientState =
function
() {
return
'{"scrollTop":'
+ Math.round(
this
._scrollTop) +
',"scrollLeft":'
+ Math.round(
this
._scrollLeft) +
',"isDirty":'
+
this
._isDirty +
'}'
;
}
</script>
RadTreeView:
<script type=
"text/javascript"
>
Telerik.Web.UI.RadTreeView.prototype.saveClientState =
function
() {
return
"{\"expandedNodes\":"
+
this
._expandedNodesJson +
",\"collapsedNodes\":"
+
this
._collapsedNodesJson +
",\"logEntries\":"
+
this
._logEntriesJson +
",\"selectedNodes\":"
+
this
._selectedNodesJson +
",\"checkedNodes\":"
+
this
._checkedNodesJson +
",\"scrollPosition\":"
+ Math.round(
this
._scrollPosition) +
"}"
;
}
</script>
RadListBox:
<script type=
"text/javascript"
>
Telerik.Web.UI.RadListBox.prototype.saveClientState =
function
() {
return
"{"
+
"\"isEnabled\":"
+
this
._enabled +
",\"logEntries\":"
+
this
._logEntriesJson +
",\"selectedIndices\":"
+
this
._selectedIndicesJson +
",\"checkedIndices\":"
+
this
._checkedIndicesJson +
",\"scrollPosition\":"
+ Math.round(
this
._scrollPosition) +
"}"
;
}
</script>
The fix for the issue will be included in the upcoming Service Pack.
Regards,
Hristo Valyavicharski
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
This problem shouldn't exist in the RadDropDownList? If you receive error message please open new thread here: http://www.telerik.com/forums/aspnet-ajax/dropdownlist and describe the problem in details.
Thanks.
Regards,
Hristo Valyavicharski
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
'Same error can be thrown if you are using RadScheduler, RadListBox, RadDropDownList, RadTreeView.'
So I was going from that.
This was a mistake. I edited my post. Fix for the other issues will be included in Q3 2014 SP1. It is expected to be released till the end of week.
Regards,
Hristo Valyavicharski
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
I am also getting the same issue. I added the Javascript in the Masterpage of my application. But I am getting the error "Uncaught TypeError: Cannot read property 'prototype' of undefined ".
I changed the code as
$(Telerik.Web.UI.RadListBox).prototype.saveClientState =funtion(){
// code
}
Now I am getting
" Uncaught TypeError: Cannot set property 'saveClientState' of undefined (anonymous function)" Error
How can I solve this?
Regards,
Hristo Valyavicharski
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
Is there any solution for my below issue without updating the Telerik Q3. I am using 2014.1.225.40 version
" I added the Javascript in the Masterpage of my application. But I am getting the error "Uncaught TypeError: Cannot read property 'prototype' of undefined ".
I changed the code as
$(Telerik.Web.UI.RadListBox).prototype.saveClientState =funtion(){
// code
}
Now I am getting
" Uncaught TypeError: Cannot set property 'saveClientState' of undefined (anonymous function)" Error
How can I solve this? "
"
Is there any solution for my below issue without updating Telerik Q3. I am using 2014.1.225.40 Version
" I added the Javascript in the Masterpage of my application. But I am getting the error "Uncaught TypeError: Cannot read property 'prototype' of undefined ".
I changed the code as
$(Telerik.Web.UI.RadListBox).prototype.saveClientState =funtion(){
// code
}
Now I am getting
" Uncaught TypeError: Cannot set property 'saveClientState' of undefined (anonymous function)" Error
How can I solve this? "
What can I do the resolve this?
if (Telerik.Web.UI.RadTreeView != undefined) {
[RadTreeView fix goes here]
}
When including the fix in the master page, there might not be an instance of that control on a particular page, so it will throw an error on that page unless you add this condition to the fix. At least I think that's what the problem is anyway :)
Hope that helps!
With this update Q3 SP1 2014.3.1209, i am having issues on radgrid.
System.InvalidCastException: Conversion from string
" " to type 'Integer' is not valid. --->
System.FormatException: One of the identified items was in an invalid format.
Another error we found:
System.InvalidOperationException: Telerik.Web.UI.RadGrid
with ID='RadGrid1' was unable to find an embedded skin with the name 'Hay'.
Please, make sure that the skin name is spelled correctly and that you have
added a reference to the Telerik.Web.UI.Skins.dll assembly in your project. If
you want to use a custom skin, set EnableEmbeddedSkins=false.
Nothing else was changed in code.
Just, update the dll's and we get these errors.
Hi All,
although this problem should be fixed since 2014,
I experienced it just now with a RadTreeList Control.
Is it really fixed also for RadTreeList?
What is the workaround for RadTreeLis?
Regards Peter
We are not aware of this problem and I was unable to reproduce it in the live demo of RadTreeList: https://www.screencast.com/t/WQkCGipFE.
Are you able to replicate the issue in the live demo: http://demos.telerik.com/aspnet-ajax/treelist/examples/overview/defaultcs.aspx?
If not, can you please test your app with the latest version of the AJAX components: 2017.3.913?
If the problem still persists, please isolate it in and send a simple working project along with step-by-step instructions of how to reproduce it locally.
Kind Regards,
Rumen
Progress Telerik