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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to change the back color of special dates in WinForms ScheduleControl?

Platform: WinForms |
Control: ScheduleControl |
Published Date: May 23, 2015 |
Last Revised Date: January 10, 2020
Tags: styling

Change the back color of special dates

You can set different colors for specific days in the Schedule control. This can be achieved by checking the Column index and using the QueryCellInfo event. In the following code example, different colors for the 5th and 6th columns are applied.


//sets the color of prime time cells in the calendar.
this.scheduleControl1.Appearance.PrimeTimeCellColor = Color.FromArgb(0, Color.Wheat);
//sets the color of prime time cells in the calendar.
this.scheduleControl1.Appearance.NonPrimeTimeCellColor = Color.FromArgb(0, Color.Wheat);
this.scheduleControl1.GetScheduleHost().QueryCellInfo += new Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventHandler(Form1_QueryCellInfo);
void Form1_QueryCellInfo(object sender, Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs e)
    if (e.ColIndex == 5)
        //Applies back color for 5th column.
        e.Style.BackColor = Color.LightSkyBlue;
    if (e.ColIndex == 6)
        //Applies back color for 6th column.
        e.Style.BackColor = Color.Pink;



'Sets the color of prime time cells in the calendar.
Me.scheduleControl1.Appearance.PrimeTimeCellColor = Color.FromArgb(0, Color.Wheat)
'Sets the color of Non-prime time cells in the calendar.
Me.scheduleControl1.Appearance.NonPrimeTimeCellColor = Color.FromArgb(0, Color.Wheat)
AddHandler scheduleControl1.GetScheduleHost().QueryCellInfo, AddressOf Form1_QueryCellInfo
void Form1_QueryCellInfo(Object sender, Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs e)
   If e.ColIndex = 5 Then
       'Applies back color for 5th column.
       e.Style.BackColor = Color.LightSkyBlue
   End If
   If e.ColIndex = 6 Then
       'Applies back color for 6th column.
       e.Style.BackColor = Color.Pink
   End If
End Sub


Change the back color of special dates



C#: ScheduleControl_CS

VB: ScheduleControl_VB

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment
Felix Bagur
Nov 23, 2017

If I change the view to day and then back to month, the different colors for specific days disappeared.

Mohanraj Gunasekaran [Syncfusion]
Nov 23, 2017

Hi Felix,


Thanks for using Syncfusion product.


We can understand your scenario. If you change the schedule view, we have unwired this event internally. So, you need to trigger again this event using SetupContextMenu event. Please refer to the below code example,


Code example

this.scheduleControl1.SetupContextMenu += scheduleControl1_SetupContextMenu;

void scheduleControl1_SetupContextMenu(object sender, CancelEventArgs e)


    if (this.scheduleControl1.ScheduleType == ScheduleViewType.Month)


        this.scheduleControl1.GetScheduleHost().QueryCellInfo += Form1_QueryCellInfo;




Please let us know if you have any concerns.



Mohanraj G


Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

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

Live Chat Icon For mobile