This is a migrated thread and some comments may be shown as answers.
Assigning Skin dynamically in SP 2010 webpart
1 Answer 8 Views
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 16 Mar 2011, 01:35 AM
What is the best way to dynamically assign the skin of a RadMenu control?

I've created a Sharepoint 2010 webpart, and exposed a text property named "Skin", which can be set when you modify the webpart.

I'd like to use the value of this property to change the skin once the property is set.

Therefore, I've used the following code in the PreRender event:

this.RadMenu1.Skin = WebPart.Skin.ToString();

but it doesn't seem to work... but I know the PreRender event is being fired - I can debug through it.

Is there a refresh that needs to be called after the line above?

Thanks in advance for your help.

Bill Richardson

1 Answer, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 21 Mar 2011, 07:57 PM
Hello William,

I am not sure how exactly you expose the Skin property, but your approach seems correct.
I prepared a small example web part for you - please find it attached.

Regards,
Kalina
the Telerik team
Tags
Menu
Asked by
William
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Share this question
or