Timeline with custom attributes

2 posts, 0 answers
  1. David Penny
    David Penny avatar
    174 posts
    Member since:
    Jun 2006

    Posted 09 Jan 2009 Link to this post


    I'm not sure if thisis an issue or something I am doing wrong (on past experience, almost certainly the latter).

    I have a RadScheduler which is populated manually.  The definition is:

    <telerik:RadScheduler ID="RadScheduler1" runat="server" CustomAttributeNames="Notes,ProjectID,OutOfOffice,Leave,Flexitime,StaffRef" 
                DataEndField="End" DataKeyField="ID" DataStartField="Start" DataSubjectField="Subject" 
                DayHeaderDateFormat="dddd dd MMMM yyyy"   
                MonthVisibleAppointmentsPerDay="6" OnClientAppointmentEditing="AppointmentEditing" 
                OnClientAppointmentInserting="AppointmentInserting" StartEditingInAdvancedForm="False" 
                Style="top: 0px; left: 0px" ValidationGroup="RadScheduler1" Height="100%"   
                Width="100%" WeekHeaderDateFormat="dd/MM/yy" HoursPanelTimeFormat="htt">  
                <TimelineView GroupBy="Resource" GroupingDirection="Vertical" /> 
                    <div style="text-align: center; background-color: #ECECC6; font-weight: bold">  
                        <%# Eval("Subject") %> 
                <MonthView VisibleAppointmentsPerDay="6" /> 
                <WeekView HeaderDateFormat="dd/MM/yy" /> 
                <Localization ConfirmDeleteText="Are you sure you want to delete this entry" ConfirmDeleteTitle="" /> 
                <DayView HeaderDateFormat="dddd dd MMMM yyyy" /> 
                    <telerik:ResourceType DataSourceID="dsResources" ForeignKeyField="StaffID"   
                        KeyField="StaffID" Name="Resource" TextField="StaffReference" /> 

    I also have an Object data source for the Resources:

    <asp:ObjectDataSource ID="dsResources" runat="server"   
            SelectMethod="ListStaffByGroupAndTeam" TypeName="dbStaff">  
                <asp:Parameter DefaultValue="" Name="Group2" Type="String" /> 
                <asp:ControlParameter ControlID="lblTeam" DefaultValue="" Name="Team"   
                    PropertyName="Text" Type="String" /> 

    I then populate the Scheduler using the following code:

    Dim dateFrom As DateTime = RadScheduler1.VisibleRangeStart  
            Dim dateTo As DateTime = RadScheduler1.VisibleRangeEnd  
            Dim ev As New dbEvent  
            Dim dt As New DataTable  
            dt = ev.ReadEvents(dateFrom, dateTo, lblTeam.Text, 0, True, True)  
            RadScheduler1.DataKeyField = "ID" 
            RadScheduler1.DataStartField = "Start" 
            RadScheduler1.DataEndField = "End" 
            RadScheduler1.DataSubjectField = "Subject" 
            RadScheduler1.Attributes("Notes") = "Notes"  
            RadScheduler1.Attributes("ProjectID") = "ProjectID"  
            RadScheduler1.Attributes("OutOfOffice") = "OutOfOffice"  
            RadScheduler1.Attributes("Leave") = "Leave"  
            RadScheduler1.Attributes("Flexitime") = "Flexitime"  
            RadScheduler1.Attributes("StaffRef") = "StaffRef"  
            RadScheduler1.DataSource = dt 

    If I remove all references to the Resources, then the Scheduler shows all of the Events exactly as expected.  But when I add the Resources section the Scheduler does not show anything at all, and certainly does not show the expected Resource Grouping.

    Is my code correct or is there something wrong with my approach?

    David Penny
  2. Peter
    Peter avatar
    6637 posts

    Posted 10 Jan 2009 Link to this post

    Hi David,

    Please, open a support ticket and send us a working demo of the issue. The code you provided here is not sufficient to diagnose the cause of the problem.

    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. DevCraft R3 2016 release webinar banner
Back to Top