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

RadScheduler, ObjectDataSource, custom fields

1 Answer 155 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
debett
Top achievements
Rank 1
debett asked on 08 Mar 2011, 07:20 PM
Hi all,

I am sorry if this question has already been answered before.

I have the scheduler that uses ObjectDataSource, which returns a list of EventItem, where EventItem is my custom class. While I was able to map all the fields that the scheduler needed, I would like to bind some other fields from EventItem. What will be the easiest way to do it on ascx page?

Ideally, I would like something like that (which doesn't work now):

<AppointmentTemplate>
    <asp:Label ID="Label1" runat="server" Text='<%# Eval("Title") %>'></asp:Label>
    <asp:Label ID="Label4" runat="server" Text="Location:"></asp:Label>
    <asp:Label ID="Label2" runat="server" Text='<%# Eval("Location") %>'></asp:Label>
    <asp:Label ID="Label3" runat="server" Text="Time"></asp:Label>
    <asp:Label ID="Label5" runat="server" Text='<%# PDConvert.ToDateTime(Eval("Start")).ToString("t") + 
    ((PDConvert.ToDateTimeN(Eval("Start"))==null) ? "" : " - " + PDConvert.ToDateTime(Eval("End")).ToString("t")  )%>'></asp:Label>
</AppointmentTemplate>




Thank you.

1 Answer, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 11 Mar 2011, 10:35 AM
Hi debett,

Basically you can use custom attributes and resources to add additional information to appointments.
Please take a look at our sample "Car Rental" application for an example of RadScheduler bound to ObjectDataSource.

If this doesn't help please send us your project as well as the database so we can help you.

Best wishes,
Veronica Milcheva
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Scheduler
Asked by
debett
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Share this question
or