We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

What property of the appointment is highlighted in the attached pic and how do i set its color programatically?

Thread ID:

Created:

Updated:

Platform:

Replies:

126249 Oct 4,2016 06:42 AM UTC Oct 5,2016 09:54 AM UTC WinForms 1
loading
Tags: ScheduleControl
Michael
Asked On October 4, 2016 06:42 AM UTC

What property of the appointment is highlighted below and how do i set its color programatically? I need to set this color based on criteria eg. Green when an appointment is done, yellow for in progress ect.

Attachment: img_eee75f8.zip

Pavithra Kodiyarasan [Syncfusion]
Replied On October 5, 2016 09:54 AM UTC

Hi Michael, 

Thanks for using Syncfusion products. 

In order to set the marker color based on the criteria, you can override the GetMarkers() to define the criteria and color for the marker in the ScheduleDataProvider overridden class. 

Code Snippet 
public class SimpleScheduleDataProvider : ScheduleDataProvider 
{ 
   ListObjectList markerList; 
   /// <summary> 
   /// Default constructor. 
   /// </summary> 
   public SimpleScheduleDataProvider() 
                : base() 
   { 
       markerList = this.MarkerList; 
   } 
   .... 
   .... 
   .... 
   public override ILookUpObjectList GetMarkers() 
   { 
      return MarkerLists(); 
   } 
   private ListObjectList MarkerLists() 
   { 
      markerList = new ListObjectList(); 
      markerList.Add(new ListObject(0, "InProgress", Color.FromArgb(50, Color.Yellow))); ////same as noMarkColor 
      markerList.Add(new ListObject(1, "Done", Color.Green)); 
      markerList.Add(new ListObject(2, "Busy", Color.Violet)); 
      markerList.Add(new ListObject(3, "Out of Office", Color.Tomato)); 
      return markerList; 
   } 
} 
 
Image 
 
 
Sample Link 
 
Regards, 
Pavithra K. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;