How can i insert picture to calendar (like your example in special days).
I didn't find how can i fill the content propertie with image object for DayTemplate.
Please send me a full code for server side programaticlly to see image in the calendar.
Where can i find the code behind for your aspx calendar examples (special days).
4 Answers, 1 is accepted
0
Hello Udi,
Did you see the Code Viewer below the Special Days example? It shows exactly how to insert images inside a Day Template:
http://telerik.com/demos/aspnet/prometheus/Calendar/Examples/Functionality/SpecialDays/DefaultCS.aspx
(Scroll down to "Example Source Code & Description")
Let us know if you need additional information.
All the best,
Dimo
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Did you see the Code Viewer below the Special Days example? It shows exactly how to insert images inside a Day Template:
http://telerik.com/demos/aspnet/prometheus/Calendar/Examples/Functionality/SpecialDays/DefaultCS.aspx
(Scroll down to "Example Source Code & Description")
Let us know if you need additional information.
All the best,
Dimo
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
udi
Top achievements
Rank 1
answered on 22 May 2008, 05:11 PM
hi,
i see that but the code their is in .aspx , i need to build that in the code behind,
that my problem.
thanks.
i see that but the code their is in .aspx , i need to build that in the code behind,
that my problem.
thanks.
0
Hi udi,
Thanks you for contacting us.
Here is some example code:
Greetings,
Instantly find answers to your questions at the new Telerik Support Center
Thanks you for contacting us.
Here is some example code:
public class CalendarCellContentTemplate : ITemplate |
{ |
private Control cellContent; |
public void New(RadCalendar calendarInstance, DateTime cellDate, Control cellContent) |
{ |
RadCalendarDay spec; |
this.cellContent = cellContent; |
int index = calendarInstance.SpecialDays.IndexOf(cellDate); |
spec = calendarInstance.SpecialDays[index]; |
if (spec == null) |
{ |
spec = new RadCalendarDay(); |
spec.Date = cellDate; |
spec.TemplateID = spec.Date.ToString("yyyy/MM/dd"); |
calendarInstance.SpecialDays.Add(spec); |
} |
DayTemplate template = new DayTemplate(); |
template.ID = spec.TemplateID; |
template.Content = this; |
spec.Repeatable = RecurringEvents.DayInMonth; |
calendarInstance.CalendarDayTemplates.Add(template); |
} |
public void InstantiateIn(Control container) |
{ |
container.Controls.Add(this.cellContent); |
} |
} |
protected void Page_Load(object sender, EventArgs e) |
{ |
if (!IsPostBack) |
{ |
CalendarCellContentTemplate ctemp = new CalendarCellContentTemplate(); |
Image img = new Image(); |
img.ImageUrl = "images/birthday.jpg"; |
ctemp.New(RadCalendar1, new DateTime(2008, 5, 23), img); |
} |
} |
Greetings,
Daniel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
udi
Top achievements
Rank 1
answered on 23 May 2008, 12:54 PM
thanks a lot it's work!!!