want to change the skin to master and other pages

9 posts, 0 answers
  1. Raj
    Raj avatar
    33 posts
    Member since:
    Jan 2012

    Posted 20 Mar 2012 Link to this post

    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
  2. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 23 Mar 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Raj
    Raj avatar
    33 posts
    Member since:
    Jan 2012

    Posted 24 Mar 2012 Link to this post

    thank you very much Tsvetina.

    whether we have to add skin manager in  all the pages.?
  5. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 26 Mar 2012 Link to this post

    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.
  6. Raj
    Raj avatar
    33 posts
    Member since:
    Jan 2012

    Posted 27 Mar 2012 Link to this post

    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..
  7. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 30 Mar 2012 Link to this post

    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.
  8. Raj
    Raj avatar
    33 posts
    Member since:
    Jan 2012

    Posted 02 Apr 2012 Link to this post

    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

  9. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 05 Apr 2012 Link to this post

    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.
  10. Raj
    Raj avatar
    33 posts
    Member since:
    Jan 2012

    Posted 05 Apr 2012 Link to this post

    thanks for your reply. but the upper border is rendering for me...
    better, I have to change to some other, instead of <Fieldset>.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017