<br />EXCEPTION
Exception Type System.InvalidCastException
Source: Telerik.Web.UI
Message: Specified cast is not valid.
Stack Trace: at Telerik.Web.UI.RadSlider.LoadClientState(Dictionary`2 clientState)
at Telerik.Web.UI.RadDataBoundControl.LoadPostData(String postDataKey, NameValueCollection postCollection)
at Telerik.Web.UI.RadSlider.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)
Please advise...
6 Answers, 1 is accepted
I noticed that you have started another forum thread about problem with a RadSlider control in an UpdatePanel, in case there is a RadToolTipManager on the page - http://www.telerik.com/community/forums/aspnet-ajax/slider/slider-movement-causing-random-getclientrects-errors.aspx.
I have already answered this post. Could you please check whether the suggested changes fix this problem as well? In case those do not make a difference, could you please post the code of your page here so that I can test it locally and find what causes the problem?
Sincerely yours,
Tsvetie
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
As I am not able to reproduce the problem locally, I will need the code of your page, exact version number of the Telerik.Web.UI assembly that you use and detailed steps that I need to follow in order to reproduce the problem.
Below is the code of my test page:
<%@ Page Language="C#" %> |
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
<html xmlns="http://www.w3.org/1999/xhtml"> |
<head id="Head1"> |
<title></title> |
<script runat="server" type="text/C#"> |
protected void RadSlider1_ValueChanged(object sender, EventArgs e) |
{ |
} |
</script> |
</head> |
<body> |
<form id="form1" runat="server"> |
<asp:ScriptManager ID="ScriptManager1" runat="server"> |
</asp:ScriptManager> |
<asp:UpdatePanel ID="UpdatePanel1" runat="server"> |
<ContentTemplate> |
<telerik:RadSlider ID="RadSlider1" runat="server" AutoPostBack="true" OnValueChanged="RadSlider1_ValueChanged"> |
</telerik:RadSlider> |
</ContentTemplate> |
</asp:UpdatePanel> |
</form> |
</body> |
</html> |
Sincerely yours,
Tsvetie
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
I experienced the same problem: I also occassionally get an InvalidCastException when clicking in a slider.
The test page as posted by the Telerik team works fine for me, but the problem occurs with discrete sliders (ItemType="Item").
Using the test page below and rapidly clicking close to the boundary between two items results in the reported InvalidCastException. The slider appears to be in between values (see attached screenshot)
Kind regards,
Thijs
<%@ Page Language="C#" %> |
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
<html xmlns="http://www.w3.org/1999/xhtml"> |
<head id="Head1"> |
<title></title> |
<script runat="server" type="text/C#"> |
protected void RadSlider1_ValueChanged(object sender, EventArgs e) |
{ |
} |
</script> |
</head> |
<body> |
<form id="form1" runat="server"> |
<asp:ScriptManager ID="ScriptManager1" runat="server"> |
</asp:ScriptManager> |
<asp:UpdatePanel ID="UpdatePanel1" runat="server"> |
<ContentTemplate> |
<telerik:RadSlider ID="RadSlider1" runat="server" ItemType="Item" AutoPostBack="true" OnValueChanged="RadSlider1_ValueChanged"> |
<Items> |
<telerik:RadSliderItem Text="1" Value="1" runat="server"/> |
<telerik:RadSliderItem Text="2" Value="2" runat="server"/> |
<telerik:RadSliderItem Text="3" Value="3" runat="server"/> |
<telerik:RadSliderItem Text="4" Value="4" runat="server"/> |
</Items> |
</telerik:RadSlider> |
</ContentTemplate> |
</asp:UpdatePanel> |
</form> |
</body> |
</html> |
I tried to reproduce the problem you describe with the provided code, but to no avail. Could you please open a new support ticket and send me a simple running project, demonstrating the problem you have? It will be best if you send video capture as well, showing the steps you follow in order to reproduce it with the test project?
Kind regards,
Tsvetie
the Telerik team
Cheers,
Thijs