AppointmentBackgroundInfo

3 posts, 0 answers
  1. Frank
    Frank avatar
    103 posts
    Member since:
    Mar 2012

    Posted 28 Mar 2018 Link to this post

    I am working on a screen that uses the scheduler.  I only want to show the month view and place the different tasks on the calendar.  I have this working the main issue I am having is I would like to color the background based on our own internal status.  As of right now I have been able to use the AppointmentFormatting to change the colors and have it display the way I would like.  I also see that I could add AppointmentBackgroundInfo so for Status Id's that already exist are no issue.  Is there a way to override the existing status backcolor and gradientstyle?
  2. Frank
    Frank avatar
    103 posts
    Member since:
    Mar 2012

    Posted 29 Mar 2018 Link to this post

    I think for what I am doing I have the best solution
  3. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3462 posts

    Posted 02 Apr 2018 Link to this post

    Hello, Frank,   

    The AppointmentBackgroundInfo controls the back color of the AppointmentElement. You can event create your own custom AppointmentBackgroundInfo. The following forum thread demonstrates how to create a custom AppointmentBackgroundInfo: https://www.telerik.com/forums/change-appointments-back-color

    An alternative approach is to use the AppointmentFormatting event. It gives you the opportunity to fully customize the AppointmentElement.

    Feel free to use this approach which suits your requirement best.

    As to the appointment's status, you can hide it by setting the RadScheduler.ShowAppointmentStatus property to false. Thus, only the background will be rendered. Alternatively, you can add your custom status. Here is demonstrated a sample code snippet: 
    AppointmentStatusInfo appointmentStatusInfo = new AppointmentStatusInfo((int)AppointmentStatus.Tentative,
        "Test", Color.Red,Color.Yellow, AppointmentStatusFillType.Hatch);
    this.radScheduler1.Statuses.Add(appointmentStatusInfo);
    this.radScheduler1.Statuses.RemoveAt(2);
     
    a.StatusId = this.radScheduler1.Statuses.Last().Id;



    I hope this information helps. If you have any additional questions, please let me know. 

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top