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


    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 ( 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.


  2. Answer
    Boyan Dimitrov
    Boyan Dimitrov avatar
    1728 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";

    Boyan Dimitrov

    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. DevCraft R3 2016 release webinar banner
Back to Top