Rotator in XmlHttpPanel Not working

3 posts, 1 answers
  1. Thomas
    Thomas avatar
    8 posts
    Member since:
    Dec 2010

    Posted 08 Dec 2010 Link to this post

    Dear Sir/Madam, I 'm experiencing the following problem

    I have an XmlHttpPanel with a radrotator (and an asp:repeater just for test purposes).
    <telerik:RadXmlHttpPanel runat="server" ID="xmlPanel"  onservicerequest="Panel_ServiceRequest" Width="100%" Height="100%" Skin="Black">
                   
                    <telerik:RadRotator ID="ItemRotator" RotatorType="CoverFlowButtons" runat="server"  Height="200px" Width="400px" ItemWidth="100" ItemHeight="100">
                    <ItemTemplate>
                        <div style="width:96px; height:96px; margin:2px; background-color: black; border:2px solid white;">
                            <asp:label ID="Label1" runat="server"><%#Eval("Caption")%> </asp:label>
                        </div>
                    </ItemTemplate>
                    </telerik:RadRotator>
                   
     
                  <hr />
     
                   
                  <asp:Repeater runat="server" ID="ItemRepeater">
                      <ItemTemplate>
                        <div style="width:400px; height: 100px; background-color:Black;border:2px solid white; float:left; margin: 2px;">
                           <asp:Label runat="server"> <%#Eval("Caption") %></asp:Label>
                        </div>
                      </ItemTemplate>
                  </asp:Repeater>
                   
              </telerik:RadXmlHttpPanel>

    When i load the data on the Page_load everything seems to work ok. (I am using this:)

    protected void Page_Load(object sender, EventArgs e)
       {       
            
           String AbsoluteURL = "";
           AbsoluteURL = "xmldata.aspx";
     
           Data = DataFetcher.URLtoDataset(AbsoluteURL, DataFetcher.DataKind.RecordSet);
     
           ItemRotator.DataSource = Data;
           ItemRotator.DataBind();
           ItemRepeater.DataSource = Data;
           ItemRepeater.DataBind();
     
     
       }

    Where the DataFetcher.URLtoDAtaset returns a dataset from a web page.

    I have a RadTreeView on my page and i want to select a subset of data by click a node, so i use the client-side item click event of the treeview to trigger the XmlHttpPanel's ServiceRequest function - this works ok

    Then in the ServiceRequestFunction I change the datasource for both the RadRotator and asp:Repeater, the place where the radrotator was, now appear empty, but the asp:repeater shows the propert data.

    This is my ServiceRequest Function: 
    protected void Panel_ServiceRequest(object sender, RadXmlHttpPanelEventArgs e) {
     
        SelectedData = GetSelectedData();
        ItemRotator.DataSource = SelectedData;
        ItemRotator.DataBind();
      
        ItemRepeater.DataSource = SelectedData;
        ItemRepeater.DataBind();
     
     }

    The GetSelectedDataFunction Works fine, because the asp:repeater shows the correct data - what am I missing here ?

    Thank you for your time...
    Thomas Sarmis
  2. Answer
    Pero
    Admin
    Pero avatar
    1156 posts

    Posted 08 Dec 2010 Link to this post

    Hi Thomas,

    Could you please set the EnableClientScriptEvaluation of the RadXmlHttpPanel property to true? I think the problem is caused by the fact that the RadRotator's client object is not created after the Callback.

    Greetings,
    Pero
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Thomas
    Thomas avatar
    8 posts
    Member since:
    Dec 2010

    Posted 11 Dec 2010 Link to this post

    Pero, thank you for your answer, I test it and it seems to work fine.
Back to Top