This is a migrated thread and some comments may be shown as answers.

using special days

3 Answers 81 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 24 Jun 2009, 10:34 AM
Hi im using special days to colour a set number of days in a radcalendar
while (startDate.Date <= endDate.Date)  
            {  
                RadCalendarDay specialDay = new RadCalendarDay();  
                specialDay.Date = startDate;  
                specialDay.ItemStyle.BackColor = Color.Green;  
                specialDay.ToolTip = "Available";  
                RadCalendar1.SpecialDays.Add(specialDay);  
                startDate = startDate.AddDays(1);  
            } 
what i would like to know is how do i get this to work if i change the number of days i would like to colour from say 7 to 3 as the full 7 days are still staying coloured when i rerun this in the method.

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 24 Jun 2009, 11:15 AM
Hello Kevin,

I am not sure about your requirement. You can add the specialdays in DayRender event. Check for the condition in DayRender event and add required days in SpecialDays collection in DayRender event itself, if you want to change the number of days.

Shinu.
0
Kevin
Top achievements
Rank 1
answered on 24 Jun 2009, 11:24 AM
Hi Shinu

I cant use the DayRender Event as the way the special days work is that on another even that is called when i have a selected item from a RadComboBox it calls our database via ADO.net then creates the special days based on the rows that are returned. where the issue is that if the call is rerun then the special days are resorted but the colour stays on all the previous days called if the number of days was high than what is being called
0
Kevin
Top achievements
Rank 1
answered on 08 Jul 2009, 10:12 AM
Hi I have an update to the Requirements that i have i need to make the special days that im using stay enabled as at the moment when roll over them with my mouse they seem to change colour back to white is there anything that i can do to make them stay green?
Tags
Calendar
Asked by
Kevin
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Kevin
Top achievements
Rank 1
Share this question
or