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

Register custom skin in web.config

3 Answers 253 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mink
Top achievements
Rank 1
Mink asked on 26 Oct 2009, 03:00 PM
Hi,

I have made a custom skin by editing an existing skin. It all works fine except that I'm not able to register the custom skin through web.config. For now I have programmatically registered the proper css file for each control.

I'm sure the problem is that I don't give the proper value for the 'value' property of <appSettings> <add key="Telerik.Skin" value="..."/>, but I can't figure out what the proper value would be.
The path to the skin from the web application's root folder is 'Layout/Skins/MySkin'. In this folder all the css files like 'Grid.MySkin.css' reside and all the subfolders like 'Grid'. The structure of the folders and the files is correct because if I register the css file programatically for the RadGrid it works fine.

Can someone please tell me what I should use as value for the 'value' property in web.config to get things working without having to register the css file for each control I use?
It is probably very simple but it's very annoying I can't figure it out.

Regards,

Mink

3 Answers, 1 is accepted

Sort by
0
Accepted
Paul
Telerik team
answered on 26 Oct 2009, 04:52 PM
Hi Mink,

The value in the web.config should be the name of the skin, i.e. <add key="Telerik.Skin" value="MySkin"/>. Still, you will have to registed the CSS files in the head tag of the pages as described in this article.

Best wishes,
Paul
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Mink
Top achievements
Rank 1
answered on 27 Oct 2009, 08:14 AM
Ah right,

Well thanks.
I already used this approach but I thought that it should be possible to both declare which skin to use in web.config and give the location of MySkin. The article is pretty much the same as the Telerik documentation I have on my computer and I thought that it said that you can either set the custom skin including its location declaratively, programmatically or in the web.config file.
But I now understand that you can only declare which skin to use in web.config and giving the location of the skin/css-file can be done either declaratively or programmatically.
So I already did it the way it should be done but I falsely thought it could be done more efficient.
Thanks for setting me straight.

Regards,

Mink
0
Accepted
Dimo
Telerik team
answered on 27 Oct 2009, 09:36 AM
Hi Mink,

By design, registration of custom skins is a task for the developer. You can make this process easier if you use custom embedded skins. In this way, you will not have to take care of the CSS files and images' physical location.

http://www.telerik.com/community/forums/aspnet-ajax/style-builder/tool-for-embedding-custom-skins-into-an-assembly.aspx


Regards,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Mink
Top achievements
Rank 1
Answers by
Paul
Telerik team
Mink
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or