Hi Team,
I have problems to fire templatesID added as markups at runtime using demo samples. The TemplateID MondayTemplate are not fired but the item is marked as Special days in render. TemplateId are only working if specialDays are added as markup in the initial page like DateTemplate. Special days(as markup or runtime) are lost after paging need some event to reload?. Could you reproduce and help us? Regards
The Result is like no template added
<td title="Tip">
<div class="radTemplateDay_Special">18</div>
</td>
SpecialDays are lost after paging to next or prev month if added or not as markup.
I have problems to fire templatesID added as markups at runtime using demo samples. The TemplateID MondayTemplate are not fired but the item is marked as Special days in render. TemplateId are only working if specialDays are added as markup in the initial page like DateTemplate. Special days(as markup or runtime) are lost after paging need some event to reload?. Could you reproduce and help us? Regards
<telerik:RadCalendar ID="RadCalendar1" runat="server" Skin="Special" EnableMultiSelect="true" FirstDayOfWeek="Monday" UseRowHeadersAsSelectors ="true" |
EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false" EnableMonthYearFastNavigation="false" DayNameFormat="Short" |
ShowRowHeaders="true" ShowOtherMonthsDays="false" OnDefaultViewChanged="RadCalendar1_DefaultViewChanged"> |
<ClientEvents OnDateSelecting="DateSelected" /> |
<HeaderTemplate> |
<asp:Image ID="HeaderImage" runat="server" Width="757" Height="94" Style="display: block" /> |
</HeaderTemplate> |
<FooterTemplate> |
<asp:Image ID="FooterImage" runat="server" Width="757" Height="70" Style="display: block" /> |
</FooterTemplate> |
<SpecialDays> |
<telerik:RadCalendarDay Date="2010/06/16" Repeatable="DayInMonth" TemplateID="DateTemplate" /> |
</SpecialDays> |
<CalendarDayTemplates> |
<telerik:DayTemplate ID="DateTemplate" runat="server"> |
<Content> |
<div class="rcTemplate rcDayDate"> |
date |
</div> |
</Content> |
</telerik:DayTemplate> |
<telerik:DayTemplate ID="MondayTemplate" runat="server" > |
<Content> |
<div class="rcTemplate rcMondayDate"> |
date |
</div> |
</Content> |
</telerik:DayTemplate> |
protected void Page_Load(object sender, EventArgs e) |
{ |
if (!IsPostBack) |
{ |
RadCalendarDay NewDay = new RadCalendarDay(RadCalendar1); |
NewDay.Date = new DateTime(2010, 6, 20); <--Fire |
NewDay.Repeatable = RecurringEvents.DayAndMonth;<--Fire |
NewDay.TemplateID = "MondayTemplate"; <---------------NOT FIRED |
NewDay.ToolTip = "Tip"; <---Fire or ItemStyle.CssClass = "MyClass"; is ok. |
RadCalendar1.SpecialDays.Add(NewDay); |
} |
} |
The Result is like no template added
<td title="Tip">
<div class="radTemplateDay_Special">18</div>
</td>
SpecialDays are lost after paging to next or prev month if added or not as markup.