When we create special days for radCalendar in code behind, we are notre able to set the ItemStyle property because it is readonly. This property should be opened for assignment like we are able to do so when we create SpecialDays in the html script. Thank you, Alain
Hi Alain,
The ItemStlye property itself is Read-Only, but the Child properties are not. Those are the actual properties you will need to assign values to.
Here is how it works:
Even in the markup, you're setting the values to the ItemStyle's child properties.
<telerik:RadCalendarDay>
<ItemStyle CssClass="someClass" ForeColor="Red" />
</telerik:RadCalendarDay>
OR
Inline declaration
<telerik:RadCalendarDay ItemStyle-CssClass="someClass" ItemStyle-ForeColor="Red">
</telerik:RadCalendarDay>
Setting values to Child properties of the ItemStyle
var calendarDay = new RadCalendarDay();
calendarDay.ItemStyle.CssClass = "someClass";
calendarDay.ItemStyle.ForeColor = System.Drawing.Color.Red;
Setting values to Child properties of the ItemStyle
Dim calendarDay = New RadCalendarDay()
calendarDay.ItemStyle.CssClass = "someClass"
calendarDay.ItemStyle.ForeColor = System.Drawing.Color.Red
Regards,
Attila Antal
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.