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

RadSlider not visible on RadWindow

2 Answers 81 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Marco Miccini
Top achievements
Rank 1
Marco Miccini asked on 10 Jan 2010, 10:45 AM
I've an aspx page with inside a <RadWindow ...><ContentTemplate><telerik:RadSlider id="rl" ...></ContenTemplate></RadWindow> .
The RadWindow is set with VisibleOnPageLoad="true".
In the RadWindow I can see all the controls except the RadSliders that remains not visible: why?
I've tried to call a javascript function on the OnClientShow of the RadWindow to repaint the sliders as suggested in an anwser in these forums as follows:

function

 

OnClientShow(sender, eventArgs) {
var wnd = $find("<%= rl.ClientID %>");

 

slider.repaint();}

Unfortunately it does not compile since the "rl" control is inside a ContentTemplate and I do not know how to access this element from javscript.
Any help?

2 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 11 Jan 2010, 08:31 AM
Hi Marco Miccini,
You can use the following approach to get a reference to the slider control:
<form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
     
    <telerik:RadWindow ID="RadWindow1" runat="server" VisibleOnPageLoad="true" OnClientShow="OnClientShow">
        <ContentTemplate>
            <telerik:RadSlider ID="RadSlider1" runat="server"></telerik:RadSlider>
        </ContentTemplate>
    </telerik:RadWindow>
     
    <script type="text/javascript">
    function OnClientShow(sender, args)
    {
        $find('<%= RadWindow1.ContentContainer.FindControl("RadSlider1").ClientID %>').repaint();
    }
    </script>
</form>

Kind regards,
Tsvetie
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Marco Miccini
Top achievements
Rank 1
answered on 11 Jan 2010, 09:05 AM
Dear Tsvetie,
thanks a lot for your help, your support at Telerik is always fantastic!
Now the javascript works and, more important, the comboboxes in the RadWindows are finally visible.
Marco
Tags
Slider
Asked by
Marco Miccini
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Marco Miccini
Top achievements
Rank 1
Share this question
or