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

FIX: Server error after postback when you have an invisible RadSlider control on the page

0 Answers 80 Views
Slider
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Telerik Admin
Top achievements
Rank 1
Iron
Telerik Admin asked on 22 Mar 2010, 02:05 PM
Hi guys,

We have discovered a bug in RadSlider in Q1 2010 release (version 2010.1.309).

PROBLEM
A server error "Specified cast is not valid." can occur after postback, when you have an invisible RadSlider control (either the slider, or one of its parents, has "display:none" applied) with items, defined on the page.

SOLUTION
As a workaround, you can execute the following code, when the RadSlider control fires its load event:
<script type="text/javascript"
    function OnClientLoad(sender,args) 
    { 
        sender.updateClientState(); 
    } 
</script> 

<telerik:RadSlider ID="RadSlider1" runat="server" ItemType="Item" OnClientLoad="OnClientLoad" 

What is Next
The problem is already fixed and the fix will be available in the next Latest Internal Build and the first service pack.

Please accept our sincere apologies for the caused inconvenience.
Tags
Slider
Asked by
Telerik Admin
Top achievements
Rank 1
Iron
Share this question
or