Setting BackColor on ResourceStyleMapping in code behind

2 posts, 1 answers
  1. timmy
    timmy avatar
    38 posts
    Member since:
    Dec 2006

    Posted 07 Nov 2014 Link to this post

    Hi,

    I'd like to set the BackColor property of a resourcestylemapping using code behind. At the moment I am setting the applyCSSclass in the code behind (VB.net) as follows:

    radscheduler.ResourceStyles.Add(New ResourceStyleMapping("User", "10", "rsCategoryBlue"))

    This works fine but I would like to set the BackColor rather than applyCSSclass but there does not seem to be a property for it using the above method.

    Thanks

    Tim
  2. Answer
    Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 12 Nov 2014 Link to this post

    Hello Tim,

    Please try the following approach:
    //code behind
    ResourceStyleMapping mapping = new ResourceStyleMapping();
               mapping.BackColor = System.Drawing.Color.Blue;
               mapping.Type = "User";
               mapping.Key = "10";
               RadScheduler1.ResourceStyles.Add(mapping);



    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
Back to Top