RadTicker Visible set from XML?

2 posts, 0 answers
  1. Jon
    Jon avatar
    1 posts
    Member since:
    May 2012

    Posted 28 Feb 2013 Link to this post

    Hi everyone,

    I'm hoping someone may know how to do this.

    I took the jewelry sample from the demo site and customized it slightly so that I could have it work with my demo. Nothing major at all, just size and placement.

    But I was wondering about, depending on a value within the XML, if I could switch the side of the screen that it appears on?

    So I set up the ticker to display on both the left and right side, no issues, they both behave exactly the same.

    What I was hoping is that I could set the visible property for the ticker based on an entry in the xml data file.

    Here's what I was hoping to do:

    <

     

     

    telerik:RadTicker ID="RadTicker2" runat="server">

     

     

     

    <Items>

     

     

     

    <telerik:RadTickerItem Text='<%# XPath("Title")%>' Visible='<%# XPath("LeftSideVisible")%>></telerik:RadTickerItem>

     

     

     

    </Items>

     

     

     

    </telerik:RadTicker>

    And my xml entry looks like this:

     

    <

     

     

    NewsItem>

     

    <

     

     

    Title>

     

     

     

     

     

    This option shows what it would look like if the left of the image was blank (for demo purposes)

     

     

     

    </

     

     

    Title>

     

    <

     

     

    Image>Images/Testing/Splash-Test-1.jpg</Image>

     

    <

     

     

    ItemName>Images/Testing/Splash-Test-1.jpg</ItemName>

     

    <

     

     

    URLIcon>Images/Testing/demo-info.png</URLIcon>

     

    <

     

     

    URL>~/AboutUs.aspx</URL>

     

    <

     

     

    bool name="LeftSideVisible">true</bool>

     

    <

     

     

    bool name="RightSideVisible">false</bool>

     

    </

     

     

    NewsItem>

     



    But when I do this I a type mismatch thrown by the ticker.

    Any ideas as to how I can do this? I'm open to any suggestions :)

    Thanks,
    Jon
  2. Slav
    Admin
    Slav avatar
    1356 posts

    Posted 04 Mar 2013 Link to this post

    Hi Jon,

    I have attached a sample page that demonstrates a possible approach for achieving the desired functionality. Please use it as a reference for incorporating the feature in your actual project.

    Kind regards,
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top