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. Image for the cookie policy date

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

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

1 Reply

PK Pavithra Kodiyarasan Syncfusion Team 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. 


Loader.
Live Chat Icon For mobile
Up arrow icon