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

Slider move content in repeater

1 Answer 79 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Roberto
Top achievements
Rank 1
Roberto asked on 15 Sep 2010, 01:10 PM
Hi,
I need scroll content from a repeater, like this example: http://demos.telerik.com/aspnet-ajax/slider/examples/customscrollbar/defaultcs.aspx, but instead of static text in a div, bind from a datasource.
Below my code block.

Anyone have any ideas?

Thanks a lot.

<div id="boxNews">
    <asp:ObjectDataSource runat="server" ID="odsNews" TypeName="Entities.News" SelectMethod="ListNews">
        <SelectParameters>
            <asp:Parameter Type="String" Name="pTitle" DefaultValue="" ConvertEmptyStringToNull="true" />
            <asp:Parameter Type="DateTime" Name="pDate" DefaultValue="" ConvertEmptyStringToNull="true" />
            <asp:Parameter Type="Int32" Name="pUnitID" DefaultValue="0" />
            <asp:Parameter Type="Int32" Name="pLimit" DefaultValue="1" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <div id="textoNews" class="scroll">
        <asp:Repeater runat="server" ID="rptNews" DataSourceID="odsNews">
            <ItemTemplate>
                            <a href='Noticias/Noticias.aspx?idNoticia=<%#Eval("ID") %>'>
                                <%#string.Format("{0:dd}", Eval("Date"))%>.<%#string.Format("{0:MMM}", Eval("Date")).Substring(0, 3)%>.<%#string.Format("{0:yyyy}", Eval("Date"))%><br /><%#Eval("Title")%><br /><p id="itemNews">
                                    <span style="font-weight: normal">
                                        <%# Eval("Description").ToString().Length > 50 ? Eval("Description").ToString().Substring(0, 50) + "..." : Eval("Description").ToString()%></span></p>
                                        <br />
                        </a>
            </ItemTemplate>
        </asp:Repeater>
    </div>
</div>
<telerik:RadSlider ID="RadSlider1" runat="server" Height="222px" Length="22"
    Orientation="Vertical" Width="200px">
</telerik:RadSlider>

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 16 Sep 2010, 11:57 AM
Hi roberto,

 I already answered your other thread and for your convenience and for others who might have the same question I pasted my reply below:

I examined your code but I do not see where you implement the demo in it and also there is no javascript in your code sample.

What I can suggest is the following:

1) Go to the demo and click on the Instructions tab on the code viewer
2) Read the instructions on how to run the code locally
3) Modify the code by simply replacing the content there with your custom content

In case you still experience problems after that, please send us a fully runnable demo (use a fake programmatic datasource for the repeater) along with detailed explanations of the exact problem with the demo code in your case and we will do our best to help.


Regards,
Svetlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Slider
Asked by
Roberto
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or