Creating RadSkinManager from code-behind

3 posts, 0 answers
  1. Al
    Al avatar
    203 posts
    Member since:
    Oct 2006

    Posted 04 Dec 2014 Link to this post

    Can someone please explain why this code does nothing on my page? 


    public partial class SettingsDialog : System.Web.UI.Page
    {
     
        public RadSkinManager rsm;
     
        protected void Page_Load(object sender, EventArgs e)
        {
            rsm = new RadSkinManager();
            rsm.Skin = "Glow";
            Form.Controls.Add(rsm);
             
        }
    }
  2. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 09 Dec 2014 Link to this post

    Hello,

    The Page_Load event handler is too late in order to add the skin manager to the page and apply the desired skin to the Telerik controls. Please use Page_Init instead as shown below:
    //code
    public RadSkinManager rsm;
     
        protected void Page_Init(object sender, EventArgs e)
        {
            rsm = new RadSkinManager();
            rsm.Skin = "Glow";
            rsm.Enabled = true;
            Form.Controls.Add(rsm);
     
        }



    Regards,
    Boyan Dimitrov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Al
    Al avatar
    203 posts
    Member since:
    Oct 2006

    Posted 09 Dec 2014 in reply to Boyan Dimitrov Link to this post

    Thanks Boyan
Back to Top