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

ReadOnly Scheduler Issues Using Appointment Template

1 Answer 76 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 30 Apr 2009, 06:40 PM
I am trying to set up a simple scheduler that gets info from a  SQL data source and simply displays it.  I assume I  create just a "Appointment Template" and display the data.  I don't want the user to edit or add to this calendar directly - i just want them to see the appointments and then I will create links in the template that do various things....

I am getting the following exception:

DataBinding: 'Telerik.Web.UI.Appointment' does not contain a property with the name 'event'.


"Event" is certainly part of my DataSource however:
<asp:SqlDataSource ID="sqlds_Tasks" runat="server"  
            ConnectionString="<%$ ConnectionStrings:Master_ConnectionString %>" SelectCommand="SELECT a.last_name + ', '+ a.first_name as CustomerName, 
       a.record, 
       b.event, 
       b.event_date, 
       DateAdd(hour, 1, b.event_date) as EndDate, 
       b.importance, 
       b.app_notes, 
       b.hide 
      FROM records a 
      INNER JOIN notes b 
      ON b.record = a.record 
      WHERE a.d_id = @d_id AND b.event_date IS NOT NULL"> 
            <SelectParameters> 
                <asp:SessionParameter Name="d_id" SessionField="D_ID" /> 
            </SelectParameters> 
        </asp:SqlDataSource> 

My Scheduler:
<telerik:RadScheduler ID="scheduler_Events" runat="server"  
            DataEndField="EndDate" DataKeyField="record" DataSourceID="sqlds_Tasks"  
            DataStartField="event_date" ReadOnly="True" DataSubjectField="event"
            <AppointmentTemplate> 
            <b><%#Eval("event")%>&nbsp;&nbsp;-&nbsp;&nbsp;<%#Eval("importance")%></b><br /> 
                Record: <%#Eval("record")%>&nbsp;&nbsp;-&nbsp;&nbsp;<%#Eval("CustomerName")%><br /> 
                <%#Eval("app_notes")%> 
            </AppointmentTemplate> 
        </telerik:RadScheduler> 

Shouldn't this alone simply place that data into the template and that's it?

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 01 May 2009, 09:14 AM
Hi Shawn,

Please, try using <%#Eval("Subject")%> instead of <%#Eval("event")%>.


Kind regards,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Scheduler
Asked by
Shawn
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or