2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
Customize the cell valueThe appearance and accessibility of the cell value can be customized by handling the event named, DateCellQueryInfo in the MonthCalendarAdv. The following code example demonstrates the same. C# //Handles this event to provide custom formatting for calendar cells. this.monthCalendarAdv1.DateCellQueryInfo += new Syncfusion.Windows.Forms.Tools.DateCellQueryInfoEventHandler(monthCalendarAdv1_DateCellQueryInfo); void monthCalendarAdv1_DateCellQueryInfo(object sender, Syncfusion.Windows.Forms.Tools.DateCellQueryInfoEventArgs e) { if (this.monthCalendarAdv1.Value.Date == DateTime.Today) { //Disables the highlight color of the selected date value. e.EnableHighlightColor = false; } if (e.RowIndex == 3 || e.RowIndex == 4) { //Customizes the particular cell value. e.Style.BackColor = Color.Red; e.Style.TextColor = Color.White; } } VB 'Handles this event to provide custom formatting for calendar cells. AddHandler monthCalendarAdv1.DateCellQueryInfo, AddressOf monthCalendarAdv1_DateCellQueryInfo Private Sub monthCalendarAdv1_DateCellQueryInfo(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Tools.DateCellQueryInfoEventArgs) If Me.monthCalendarAdv1.Value.Date = DateTime.Today Then 'Disables the highlight color of the selected date value. e.EnableHighlightColor = False End If If e.RowIndex = 3 OrElse e.RowIndex = 4 Then 'Customizes the particular cell value. e.Style.BackColor = Color.Red e.Style.TextColor = Color.White End If End Sub The following image shows the customized cell value of the MonthCalendarAdv: Samples: |
2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.