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

want to change the skin to master and other pages

8 Answers 196 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Raj
Top achievements
Rank 1
Raj asked on 20 Mar 2012, 01:31 PM
Hello friends.
in my application i have lot of pages and one master page. i want to allow the customer to change the skin according to his wish in combobox in master page and i need to store the skin name along with the customer details, so that next he logins in skin loads by default. 
is it possible to set the skin master page and that makes other pages to change the skin. if yes, how can i make this possible.
thanks in advances
S.Rajkumar

8 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 23 Mar 2012, 04:18 PM
Hello Raj,

You can use the RadSkinManager control which serves this purpose exactly. You just need to declare it in the master page and set ShowChooser="true".
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" Skin="Black">
</telerik:RadSkinManager>

Also, remove the Skin property assignments from all controls that you want to be skinned by the manager.

Greetings,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Raj
Top achievements
Rank 1
answered on 24 Mar 2012, 12:13 PM
thank you very much Tsvetina.

whether we have to add skin manager in  all the pages.?
0
Tsvetina
Telerik team
answered on 26 Mar 2012, 07:17 AM
Hello Raj,

As long as you have a top level page, like a master that is used all over your site, you do not need and should not put the manager on other pages. It takes care of all child pages/user controls from the place where it is declared.

Regards,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Raj
Top achievements
Rank 1
answered on 27 Mar 2012, 11:28 AM
thanks for your reply.
i have used skin manager in all pages and every thing is working fine.
i am saving the skin name in the database according to the user wish.
if the client logs in to the application, the user's skin is not set to the control still the user changes the skin property in combo box.
i got skin property in session
in aspx page i placed skin manager coding as below.
<body>
<telerik:RadSkinManager ID="rsmskinselector" runat="server" Visible="False">
    </telerik:RadSkinManager>
    <form id="form1" runat="server">

in .cs page
protected void Page_Load(object sender, EventArgs e)
        {
            rsmskinselector.Skin = (string)Session["MySkin"];
        }
        protected void Page_PreRender(object sender, EventArgs e)
        {
            rsmskinselector.Skin = (string)Session["MySkin"];
        }
 
i used below coding  to change the skin property for the whole application
in apsx page:-

<telerik:RadSkinManager id="rsmskinselector" runat="server" showchooser="true" skin="Telerik"
                                            persistencemode="Session" onskinchanged="rsmskinselector_SkinChanged">
                                        </telerik:RadSkinManager>

in .cs page:-

protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lblusername.Text = "Welcome " + ((Ucontext)Cache["Ucon"]).Authenticdetails.UserName;
                rsmskinselector.Skin = ((Ucontext)Cache["Ucon"]).Authenticdetails.Skin;
            }
            if (Session["MySkin"] != null)
            {
                rsmskinselector.Skin = (string)Session["MySkin"];
            }
            RadComboBox chooser = (RadComboBox)rsmskinselector.Controls[0];
            chooser.SelectedIndexChanged += new                      RadComboBoxSelectedIndexChangedEventHandler(chooser_SelectedIndexChanged);
        }
 
void chooser_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            Session["MySkin"] = rsmskinselector.Skin;
        }
        protected void Page_PreRender(object sender, EventArgs e)
        {
            RadComboBox chooser = (RadComboBox)rsmskinselector.Controls[0];
 
            if (Session["ShowChooser"] != null)
            {
                chooser.Visible = rsmskinselector.ShowChooser = (bool)Session["ShowChooser"];
            }
        }
this the coding i used for my application.
i cannot load the skin property when user log in to the application.
what iam missing in this coding..
0
Tsvetina
Telerik team
answered on 30 Mar 2012, 09:14 AM
Hi Raj,

I cannot see what is wrong in your code, I tried setting Skin on Page_Load for RadSkinManager (with the same declaration as yours) and it works on my side. If you are still experiancing this problem, could you open a support ticket and send a sample runnable page that replicates the issue?

All the best,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Raj
Top achievements
Rank 1
answered on 02 Apr 2012, 07:19 AM
thanks for your reply... now its working perfectly.
i just added
"<telerik:RadFormDecorator runat="server" decoratedcontrols="All"> "
below the skin manager control for every page.....
but i have another issue in  fieldset.
i have set legend to a fieldset its working fine. but i use only filedset without legend, the color is not fixing properly for that filedset. i have this problem only in IE8. but other browser works fine.
images of using legend and without legend in fieldset.
Fieldset with legend
Fieldset without Legend
 thanks 
S.Rajkumar

0
Tsvetina
Telerik team
answered on 05 Apr 2012, 08:21 AM
Hello Raj,

There are known issues in IE8 when the legen of a fieldset is not shown. You could search them and see which one best fits your scenario. Some would be:
http://snipplr.com/view/22523/
http://eisabainyo.net/weblog/2009/05/19/fieldset-and-legend-bug-in-ie8/

All the best,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Raj
Top achievements
Rank 1
answered on 05 Apr 2012, 08:43 AM
thanks for your reply. but the upper border is rendering for me...
better, I have to change to some other, instead of <Fieldset>.
Tags
General Discussions
Asked by
Raj
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Raj
Top achievements
Rank 1
Share this question
or