How to create custom Appointment Template in RadScheduler

2 posts, 0 answers
  1. mohsen
    mohsen avatar
    1 posts
    Member since:
    Jan 2013

    Posted 21 Jan 2013 Link to this post

    hi all, i Beginner in RadScheduler control, i want create custom Appointment Template, i write this code
    <telerik:RadScheduler ID="RadScheduler1" runat="server" Skin="Office2010Blue" DisplayRecurrenceActionDialogOnMove="True" ShowNavigationPane="True"
                OnClientTimeSlotContextMenuItemClicked="ClientTimeSlotContextMenuItemClicked" OnClientAppointmentContextMenuItemClicked="ClientAppointmentContextMenuItemClicked">
                <TimelineView UserSelectable="False" />
                <DayView UserSelectable="False" />
                    <%--The appointment context menu interaction is handled on the client in this example--%>
                    <telerik:RadSchedulerContextMenu runat="server" ID="SchedulerAppointmentContextMenu">
                            <telerik:RadMenuItem Text="Detils" Value="detail">
                            <telerik:RadMenuItem Text="MoreStatus" Value="moreStatus">
                    <telerik:RadSchedulerContextMenu ID="SchedulerTimeSlotContextMenu" runat="server">
                            <telerik:RadMenuItem Text="New" Value="createNew" />
                    <div class="rsAptSubject">
                    <hr />
                    <div style="font-style: italic; background-color: Lime"><%# Eval("FromTime")%></div>

    and c# code:
    RadScheduler1.DataSource = _meetingService.AllMeetings().ToList()
           RadScheduler1.DataStartField = "FromTime"
           RadScheduler1.DataSubjectField = "Council.CouncilName"
           RadScheduler1.DataEndField = "ToTime"
           RadScheduler1.DataKeyField = "MeetingId"
           RadScheduler1.DataDescriptionField = "FromTime"
           ' RadScheduler1.SelectedDate = DateTime.Now
    but when run this page i get this error:

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

    please help me for solve this problem. thanks Expert.
  2. Plamen
    Plamen avatar
    3080 posts

    Posted 24 Jan 2013 Link to this post

    Hello Mohsen,

    The code looks correct -just make sure that the code behind is in Page_Init (or in the Page_Load) method or your DataSouce is correctly build.

    I am attaching a sample web page where similar issue is working properly.

    Hope this will be helpful.

    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.
Back to Top