Hi,
I'm trying to set the CSS class of a particular item in the rotator from code behind based on a value I obtain from the database. The following code does set the class but it sets it for a nested div and that's too deep. I need to set it on the <li> generated by the RadRotator for this item.
The generated HTML looks like this:
I need my "featured" class to be injected in the <li> just above. How can I accomplish this? (Or am I going about it the wrong way?). Thanks!
I'm trying to set the CSS class of a particular item in the rotator from code behind based on a value I obtain from the database. The following code does set the class but it sets it for a nested div and that's too deep. I need to set it on the <li> generated by the RadRotator for this item.
Private Sub RadRotator1_ItemDataBound(sender As Object, e As Telerik.Web.UI.RadRotatorEventArgs) Handles RadRotator1.ItemDataBound If IsFeatured Then e.Item.Attributes.Add("class", "featured") End IfEnd SubThe generated HTML looks like this:
<div class="rrRelativeWrapper"> <div class="rrClipRegion"> <ul class="rrItemsList"> <li class="rrItem"> <div id="ctl00_..._RadRotator1_i0" class="featured">I need my "featured" class to be injected in the <li> just above. How can I accomplish this? (Or am I going about it the wrong way?). Thanks!