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

Customize AppointmentTemplate

4 Answers 52 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Zeus_developer
Top achievements
Rank 1
Zeus_developer asked on 16 Jan 2012, 11:41 PM
Hi,

Please, I need a little help... 
how could change the div background-color and include a Photo in a image tag?

Please see the code below

<AppointmentTemplate>
<
div style='background-color: <%# Eval("BackgroundColor")%>); height: 200px'>
<img src='../uploads/avatars/<%# Eval("Photo") %>' style="height: 28px;float: left" alt='' />
    <%# Eval("Subject")%>
</div>
</AppointmentTemplate>

Thanks

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 17 Jan 2012, 05:27 AM
Hello,

Take a look into the following documentation's AppointmentTemplate section.
Templates


Thanks,
Princy.
0
Peter
Telerik team
answered on 17 Jan 2012, 03:02 PM
Hello,

Also, the following online demo might be helpful - http://demos.telerik.com/aspnet-ajax/scheduler/examples/customizeappointment/defaultcs.aspx.

All the best,
Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Zeus_developer
Top achievements
Rank 1
answered on 17 Jan 2012, 04:21 PM
Hi,

thanks for your help, I solved this way:

1.- I added custom attributes named Progress, Photo

For change the color of the Appoinment:
Protected Sub RadScheduler1_AppointmentDataBound(ByVal sender As Object, ByVal e As SchedulerEventArgs)
    If e.Appointment.Attributes("Progress") = 100 Then
        e.Appointment.BackColor = System.Drawing.Color.PaleGreen
    Else
        e.Appointment.BackColor = System.Drawing.Color.PaleVioletRed
    End If
End Sub

For assign the photo of the user:
<img src='../uploads/avatars/<%# Eval("Photo")%>' style="height: 28px;float: left; margin: 0px 3px 0px 0px" alt='' />

I hope this solution can help someone.

0
Peter
Telerik team
answered on 18 Jan 2012, 09:36 AM
Hi Segundo,

Thank you for sharing your solution in the forum.

Regards,
Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Scheduler
Asked by
Zeus_developer
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Peter
Telerik team
Zeus_developer
Top achievements
Rank 1
Share this question
or