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

How to change the back color of special dates like Saturday and Sunday ?

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

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.

C#

 

VB

 

 

Samples Links

C#: ScheduleControl_CS

VB: ScheduleControl_VB

ADD COMMENT
You must log in to leave a comment
Comments
Felix Bagur
Nov 23, 2017

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




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

 

Regards,

Mohanraj G

Reply

Please sign in to access our KB

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

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