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

How to change themes on click of button

3 Answers 338 Views
SkinManager
This is a migrated thread and some comments may be shown as answers.
eraashishgupta
Top achievements
Rank 1
eraashishgupta asked on 05 Jul 2010, 03:53 PM
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.

Thanks,
Aashish Gupta

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 05 Jul 2010, 04:33 PM
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,
Dimo
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
0
Mukesh
Top achievements
Rank 1
answered on 23 May 2011, 02:43 PM
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.



Thanks
Mukesh
0
Maria Ilieva
Telerik team
answered on 26 May 2011, 08:43 AM
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.

Tags
SkinManager
Asked by
eraashishgupta
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Mukesh
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or