Assigning Skin dynamically in SP 2010 webpart

2 posts, 0 answers
  1. William
    William avatar
    3 posts
    Member since:
    Mar 2009

    Posted 15 Mar 2011 Link to this post

    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
  2. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 21 Mar 2011 Link to this post

    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
Back to Top