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

Rotator in XmlHttpPanel Not working

2 Answers 40 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 08 Dec 2010, 09:25 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Pero
Telerik team
answered on 08 Dec 2010, 12:58 PM
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.
0
Thomas
Top achievements
Rank 1
answered on 11 Dec 2010, 04:14 PM
Pero, thank you for your answer, I test it and it seems to work fine.
Tags
Rotator
Asked by
Thomas
Top achievements
Rank 1
Answers by
Pero
Telerik team
Thomas
Top achievements
Rank 1
Share this question
or