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

Special Days will not show up until mouse hover

1 Answer 92 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
WAMatt
Top achievements
Rank 2
WAMatt asked on 04 Dec 2009, 11:15 PM
I am trying to load a special day from the code behind.  The date does not show on the calendar until after I hover over it with the mouse.

.Net Code:

 

 

  

<telerik:RadCalendar ID="calEvents" runat="server" ondayrender="calEvents_DayRender">  
</telerik:RadCalendar> 

 


C# Code:

protected void Page_Load(object sender, EventArgs e)  
{  
 
}  
protected void calEvents_DayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)  
{  
    RadCalendarDay day = new RadCalendarDay(calEvents);  
    day.Date = DateTime.Today;   
    day.IsSelected = true;  
    day.ToolTip = "Tool Tip";   
    calEvents.SpecialDays.Add(day);  

 

 

 

 

 

Can anybody tell me what I'm doing wrong?

Thanks!

Matt

 

1 Answer, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 09 Dec 2009, 06:23 PM
You might be adding the special day too late in the life cycle of the control, not allowing it to render initially. Once you hover over the item, however, it goes through whatever rendering changes a hover would change, and upon the mouse-off what wasn't able to render before ends up actually getting rendered. Try to see if you can subscribe to an earlier event :)
Tags
Calendar
Asked by
WAMatt
Top achievements
Rank 2
Answers by
Schlurk
Top achievements
Rank 2
Share this question
or