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

RadTicker Visible set from XML?

1 Answer 75 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 28 Feb 2013, 02:32 PM
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

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 04 Mar 2013, 03:14 PM
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.
Tags
Rotator
Asked by
Jon
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or