Month Calendar Highlight Date problem
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
calendar0.zip
SIGN IN To post a reply.
4 Replies
AD
Administrator
Syncfusion Team
June 23, 2006 06:46 PM UTC
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
KK
ks kee
June 26, 2006 03:15 AM UTC
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 :)
AD
Administrator
Syncfusion Team
June 26, 2006 07:47 PM UTC
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
KK
ks kee
June 28, 2006 03:49 AM UTC
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 :)
SIGN IN To post a reply.
- 4 Replies
- 2 Participants
-
KK ks kee
- Jun 23, 2006 07:02 AM UTC
- Jun 28, 2006 03:49 AM UTC