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

[Solved] Different Appointment Views

1 Answer 109 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Vishaal Chedi
Top achievements
Rank 1
Vishaal Chedi asked on 25 Feb 2010, 09:05 AM
Hello,

For the project I'm currently working on I need to show the subject and underneath the description.
I have looked at your examples and I have done it this way :
        <AppointmentTemplate> 
            <label id="lblAppointmentSubject" runat="server"
                <%# Eval("Subject") %> 
            </label>   
            <br /> 
            <label id="lblAppointmentDescription" runat="server"
                <%# Eval("Description") %> 
            </label> 
        </AppointmentTemplate> 
 

(I know the labels aren't necessary but I tried to align it).
This works fine but the things is I want different appointment information in different views.
Like say this is for the dayview but for the weekview I would only need the subject to show.
How can I manage that since there is no if/else in ASP.NET.
Maybe in the code behind??

Also another question :
is it possible to show subject and underneath it description aligned to the left.
and in the right upper corner some other info like the creator or owner or something like that?
Or align the subject to the middle?

Byee Vishaal

P.S. Your examples only show asp.net with code behind like databinding. Maybe its usefull to show some code behind like how to use a sql query and/or insert an appointment from code behind.

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 03 Mar 2010, 01:58 PM
Hi Vishaal,

You are on the right track - you have to create the appointment template dynamically if you want to have different template for each view. Luckily, we have prepared a kb article how to achieve this:

Creating and adding an appointment template dynamically and accessing the appointment object in the template class 


Regards,
Peter
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Scheduler
Asked by
Vishaal Chedi
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or