Adding style to month calendar control cell

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

1 Reply

AR Anupama Roy Syncfusion Team 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.

Loader.
Up arrow icon