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

Adding style to month calendar control cell

Thread ID:

Created:

Updated:

Platform:

Replies:

43758 May 2,2006 05:38 PM UTC May 10,2006 09:48 AM UTC WinForms 1
loading
Tags: Tools
Sarpreet Singh
Asked On May 2, 2006 05:38 PM UTC

Hi, I need to know if I can use Syncfusion.windows.Forms.Grid.GridStyleInfo to MonthCalendar.SetInfo() sub. If yes how. I am tring to change the appearance of cells available in month calendar control with respect to my selection of dates. Thx

Anupama Roy [Syncfusion]
Replied On May 10, 2006 09:48 AM UTC

Hi Singh, My sincere apologies for the delay in response. Rather than using SetInfo method ,I suggest DateCellQueryInfo event which lets you customize the appearance of cells. Please take a look at the sample code snippet. VB: Private Sub MonthCalendarAdv1_DateCellQueryInfo(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Tools.DateCellQueryInfoEventArgs) Handles MonthCalendarAdv1.DateCellQueryInfo If (e.DateValue > DateTime.Today) Then e.Style.BackColor = Color.Aqua End If End Sub C#: private void MonthCalendarAdv1_DateCellQueryInfo(object sender, Syncfusion.Windows.Forms.Tools.DateCellQueryInfoEventArgs e) { if ((e.DateValue > DateTime.Today)) { e.Style.BackColor = Color.Aqua; } } Please feel free to let us know if you have any difficulties. Thanks for choosing Syncfusion. Regards, Anu.

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

;