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

Month Calendar Highlight Date problem

Thread ID:

Created:

Updated:

Platform:

Replies:

45553 Jun 23,2006 03:02 AM Jun 27,2006 11:49 PM Windows Forms 4
loading
Tags: GridControl
ks kee
Asked On June 23, 2006 03:02 AM

I highlight date in monthcalendar as holiday. I met some problems as below. 1. when i select the date(which already highlight), the number of days when disapear as the image attach. Any solution to solve it? 2. i want set holiday by context menu pop up at date selected. On the first time i click set, the date will no hightlight. Second times and continue will be success. i already refresh calendar , but still no works as well.

calendar0.zip

Administrator [Syncfusion]
Replied On June 23, 2006 02:46 PM

Hi Ks, Regarding the Question 1: Before selecting the date , you need to clear the the month calender ''s GridControl selection and then select the date as selection. If it is not works, Try refreshing the month calender ''s GridControl to resolve the mentioned issue. Regarding the Question 2: Try refreshing the month calender ''s GridControl to resolve the mentioned issue. Here is a code snippet. //SetHoliday menu private void menu4_Click(object sender, EventArgs e) { iHoliday = 23; foreach (Control c in this.PopupWindow.Controls) { if(c is MonthCalendarAdv ) { MonthCalendarAdv month = c as MonthCalendarAdv; foreach (Control c1 in c.Controls) { if( c1 is GridControl ) { GridControl mgrid = c1 as GridControl; mgrid.Refresh(); break; } } } } } Let me know if this helps. Best Regards, Haneef

ks kee
Replied On June 25, 2006 11:15 PM

Hi Haneef, for question 1, still no work as well although i refreshing the month calender''s GridControl. I try a few event but still no work as well. which event should i use? or got other ways to do it? PS: the solution you provide for question 2 really works! thanks :)

Administrator [Syncfusion]
Replied On June 26, 2006 03:47 PM

Hi Ks, Try setting the month calender''s GridControl''s AllowSelection property to GridSelectionflags.Any. Please find the code snippet below. private void dateTimePicker_OnPopup(object sender, EventArgs e) { foreach (Control c in this.PopupWindow.Controls) { if(c is MonthCalendarAdv ) { MonthCalendarAdv month = c as MonthCalendarAdv; foreach (Control c1 in c.Controls) { if( c1 is GridControl ) { GridControl mgrid = c1 as GridControl; mgrid.AllowSelection = GridSelectionFlags.Any; break; } } } } } Please let me know if this will not serve your needs. Best Regards, Haneef

ks kee
Replied On June 27, 2006 11:49 PM

Hi Haneef, it seems still no work, i try change AlphaBlendSelectionColor to more light/transparent color. then the word will no disappear liao. grid.AlphaBlendSelectionColor = System.Drawing.Color.FromArgb(20, 49, 106, 197); Thanks for give me idea :)

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.

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.

;