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

RadRotator Not Showing When Change Visibility In FF & Safari

4 Answers 86 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Ayman
Top achievements
Rank 1
Ayman asked on 25 Jun 2012, 07:52 AM
Dear Sir
i Have a RadRotator in WebControl and i'm loading it in the page within RadAjaxPanel
in IE9 is working fine but in FF OR Safari the images not Showing in the first click button " Cmd_ReadMore " the Secound Click it's showing

how i can solve this problem

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                 <AjaxSettings>
                        <telerik:AjaxSetting AjaxControlID="Cmd_ReadMore">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                       <telerik:AjaxSetting AjaxControlID="Cmd_Back">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                 </AjaxSettings>
           </telerik:RadAjaxManager>
           <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server">
           </telerik:RadAjaxLoadingPanel>
<telerik:RadButton runat="server" ID="Cmd_ReadMore"  Text="Back"></telerik:RadButton>
<telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1">
<asp:Panel ID="Pnl_Data"  runat="server"  Visible="false" >
<telerik:RadButton runat="server" ID="Cmd_Back"  Text="Back"></telerik:RadButton>
     <ibw:imageBrowser ID="ImgBrow" runat="server"   />
</asp:Panel>
 </telerik:RadAjaxPanel>

Code Behind
Public Sub Cmd_ReadMore_Click(sender As Object, e As System.EventArgs)
        Me.Pnl_Data.Visible = True
       Me.ImgBrow.LoadImages()
End Sub
Public Sub Cmd_Back_Click(sender As Object, e As System.EventArgs)
        Me.Pnl_Data.Visible = False
        Me.ImgBrow.ClearImages()
End Sub

4 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 2
answered on 25 Jun 2012, 01:30 PM
Hello Ayman,

I would suggest not using the RadAjaxManager to update a RadAjaxPanel as it may cause some problems, as noted by Telerik. You should remove the RadAjaxPanel and set the UpdateControl to your Panel control and see if that helps.
0
Ayman
Top achievements
Rank 1
answered on 26 Jun 2012, 05:34 AM
First Thank you for replying

but still same problem
0
Slav
Telerik team
answered on 27 Jun 2012, 08:55 AM
Hi Ayman,

As Kevin mentioned setting a RadAjaxPanel as an updated control for a RadAjaxManager is not recommended. You can Ajaxify the inner Panel with ID Pnl_Data to achieve the desired result.

The problem you described is caused by an asynchronous loading of the skin style sheet resources through an AJAX request. Please load them with the main content in order to assure that they are present. There are two ways to achieve this:

  1. The first approach is to load the styles through a link tag using the Page.ClientScript.GetWebResourceUrl method. The link tag must be placed in the head content of the page:
    <link href='<%= Page.ClientScript.GetWebResourceUrl(GetType(RadRotator), "Telerik.Web.UI.Skins.Rotator.css") %>'
        rel="stylesheet" type="text/css" />
    <link href='<%= Page.ClientScript.GetWebResourceUrl(GetType(RadRotator), "Telerik.Web.UI.Skins.Default.Rotator.Default.css") %>'
        rel="stylesheet" type="text/css" />
  2. The other way is to use the RadStyleSheetManager. Note that you must register a HttpHandler in web.config in order to enable it in your project. This can be done automatically through Smart Tag, available in Design View.
    Here you can find more information about using RadStyleSheetManager.
    <telerik:RadStyleSheetManager ID="StyleSheetManager1" runat="server">
        <StyleSheets>
            <telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Rotator.css" />
            <telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Default.Rotator.Default.css" />
        </StyleSheets>
    </telerik:RadStyleSheetManager> 

Either of the two solutions will help you solve your problem. If you want to use another skin you must set its name instead of Default in the samples above.

Greetings,
Slav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Ayman
Top achievements
Rank 1
answered on 28 Jun 2012, 04:40 AM
Thank you man Grate it's work fine
Tags
Rotator
Asked by
Ayman
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 2
Ayman
Top achievements
Rank 1
Slav
Telerik team
Share this question
or