How to change themes on click of button

4 posts, 0 answers
  1. eraashishgupta
    eraashishgupta avatar
    19 posts
    Member since:
    Nov 2008

    Posted 05 Jul 2010 Link to this post

    Hi all,

    When i use the default drop down to change the Skin using the Rad Skin Manager then everything works fine.
    But in my current application i want to change theme on the click of my theme buttons say Blue, Red , Green etc
    So how can i do that using Rad Skin Manager.

    Aashish Gupta

  2. Dimo
    Dimo avatar
    8318 posts

    Posted 05 Jul 2010 Link to this post

    Hi Aashish Gupta,

    You can easily set the RadSkinManager's Skin property programmatically in the buttons' server-side Click handler. The RadSkinManager itself should not have its ShowChooser property set to "true", otherwise its dropdown will appear on the page.

    Best wishes,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
  4. Mukesh
    Mukesh avatar
    23 posts
    Member since:
    Aug 2010

    Posted 23 May 2011 Link to this post

    Hi Dimo,

    I am using RadSkinManager on Master Page, and want to change skin from content page's button click.
    On content page's button click, I am applying skin as below:

    protected void Button1_Click(object sender, EventArgs e)
        ((RadSkinManager)this.Master.FindControl("RadSkinManager1")).Skin = "Forest";

    But it is not working.... please suggest some solutions.

  5. Maria Ilieva
    Maria Ilieva avatar
    4017 posts

    Posted 26 May 2011 Link to this post

    Hello Mukesh,

    RadSkinManager should always reside on the main page or master page in order to operate properly and style RadControls. If you would like to apply skins for controls which reside in content pages or user controls, you can do that dynamically using the ApplySkin(control, skinName) method from its server-side API.

    See the relevant paragraph (the part under the ASPX section) of this help article for more details.

    All the best,
    Maria Ilieva
    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.

Back to Top