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

odd behaviour - content of all the RadRotatorItems disapear

1 Answer 33 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Filipe Peixinho
Top achievements
Rank 1
Filipe Peixinho asked on 07 Feb 2011, 04:33 PM

I'm experiencing an odd behavior from RadRotator.
I'm using the rotator control to build a custom Menu, but i'm having several problems.
The menu its defined in a .ascx file and some of items are being hide in .cs if the current user don't have de necessary permissions to view some of the items.

The problem is that if i set the visibility of the unwanted buttons (RadRotatorItem) to false, after de postback, the content of all the RadRotatorItems disapear.
Other strange behavior in the rotator that seems to cause all this problems, its the fact that de ID assigned to de RadRotatorItem in the .ascx its being overrided by other value. I have notice this in debug mode.

The only way i have found so far to acomplish the desired menu, was by creating in runTime in the OnInit event of the user control, the desired items in menu, but this is not very practical and it lacks in performance. 

Had you or someone else already notice this strange behavior?
Can you provide some help or the best workAround? 

Best Regards.

1 Answer, 1 is accepted

Sort by
0
Niko
Telerik team
answered on 10 Feb 2011, 04:00 PM
Hello Filipe,

After a thorough investigation on our side, we managed to reproduce a situation similar to the one that you described. We will drill down the problem and will make sure it is fixed. I also updated your points for bringing this problem to our attention.

Still there is a way to use this functionality (hiding the unnecessary items) by additionally setting the CssClass property value to a dummy value:

<telerik:RadRotatorItem CssClass="abcdefg" Visible="false">
    <ItemTemplate>
             template content here
    </ItemTemplate>
</telerik:RadRotatorItem>

This CssClass property should be set for the visible items as well:
<telerik:RadRotatorItem CssClass="abcdefg">
    <ItemTemplate>
          template content here
    </ItemTemplate>
</telerik:RadRotatorItem>

To summarize - you need to add CssClass for every item in the collection.

Kind regards,

Nikodim
the Telerik team
Browse the vast support resources we have to jump start 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.
Tags
Rotator
Asked by
Filipe Peixinho
Top achievements
Rank 1
Answers by
Niko
Telerik team
Share this question
or