RadScheduler to show one timeslot only

11 posts, 1 answers
  1. Ei Wai
    Ei Wai avatar
    56 posts
    Member since:
    Jul 2014

    Posted 10 Sep 2014 Link to this post

    Hi ,

    I am using RadScheduler with telerik version 2013.3.1324.35. On my scheduler, I only want to show one time slot per day per employee. I disabled the timeslot if there is one appointment. 

    protected void RadScheduler1_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)
       {
           RadScheduler scheduler = (RadScheduler)sender;
     
           if (scheduler.SelectedView == SchedulerViewType.DayView || scheduler.SelectedView == SchedulerViewType.MonthView || scheduler.SelectedView == SchedulerViewType.WeekView)
           {
               e.TimeSlot.CssClass += "Disabled";
           }
           else
           {
               int count = e.TimeSlot.Appointments.Count;
     
               if (count >= 1)
               {
                   e.TimeSlot.CssClass += "Disabled";
               }
               else
               {
                   e.TimeSlot.CssClass += "Enabled";
               }
           }
       }

    I like to disable it so that no one can insert new appointment but how can I remove grey part from my schedule? Please see attached file for sample. Thanks in advance for your help.

    Thank you.

    Best regards,
    Ei
  2. Answer
    Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 12 Sep 2014 Link to this post

    Hello,

    If you want to change the grey color you can simple change the background-color style value to other color but grey.

    If you want to reduce the height of the appointment and not have an insert area  you can use the RadScheduler WeekView-ShowInsertArea="false".


    Regards,
    Boyan Dimitrov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ei Wai
    Ei Wai avatar
    56 posts
    Member since:
    Jul 2014

    Posted 14 Sep 2014 Link to this post

    Hi Boyan Dimitrov,

    Thank you so much for your reply. Removing insert area is what I've been looking for. 

    Thank you.

    Best regards,
    Ei Wai
  5. Ei Wai
    Ei Wai avatar
    56 posts
    Member since:
    Jul 2014

    Posted 14 Sep 2014 in reply to Ei Wai Link to this post

    Hi ,

    I have another question about radscheduler. On my scheduler, I bind the appointments with employee resource. I need to limit the DayStartTime and  DayEndTime of timeline view per resource. I tried adding start and end time for Timeline view but it is only for whole scheduler. I need it to set by each resource. Is there any possible ways to do that? Thanks in advance.

    Thank you.

    Best regards,
    Ei Wai
  6. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 17 Sep 2014 Link to this post

    Hello Ei,

    Indeed the DayStartTime and  DayEndTime of timeline is applied for the RadScheduler control but no per resource. I would like to clarify that such functionality is not supported by the RadScheduler control.


    Regards,
    Boyan Dimitrov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  7. Ei Wai
    Ei Wai avatar
    56 posts
    Member since:
    Jul 2014

    Posted 17 Sep 2014 in reply to Boyan Dimitrov Link to this post

    Hi Boyan Dimitrov,

    Noted with thanks. I am using timeline view. Let's say if I want to create appointment until next day 4 am. But I don't want the time slot to extend to two days. Is there any way to do that.  Please see attached file for your reference.
  8. Plamen
    Admin
    Plamen avatar
    2730 posts

    Posted 22 Sep 2014 Link to this post

    Hello Ei,

    You can try to set the ExactTimeRendering property of RadScheduler as it is described in this on-line demo.

    Hope this will help you solve the issue.

    Regards,
    Plamen
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  9. Ei Wai
    Ei Wai avatar
    56 posts
    Member since:
    Jul 2014

    Posted 22 Sep 2014 in reply to Plamen Link to this post

    Hi Plamen,

    I tried setting ExactTimeRendering property to false for both whole scheduler and timeline view. But it is still extended to two days. Did I miss anything? 

    <telerik:RadScheduler runat="server" ID="RadScheduler1" TimelineView-NumberOfSlots="7" TimelineView-UserSelectable="true" RowHeight="30px" Skin="Sunset" SelectedView="TimelineView"  WeekView-GroupingDirection="Vertical" MonthView-GroupingDirection="Vertical" DayView-GroupingDirection="Vertical" OnClientTimeSlotClick="insertAppointment" OnClientAppointmentClick="editAppointment" DataDescriptionField="Description"  DataKeyField="SID" DataSubjectField="Subject" EnableCustomAttributeEditing="true"
    CustomAttributeNames="LocationID,ReasonCode,EmployeeID,Skill" EnableCustomAttribute="true" DataStartField="Start" DataEndField="End" AdvancedForm-EnableCustomAttributeEditing="true" ShowFooter="false" TimeZoneOffset="00:00:00" DayStartTime="00:00:00" TimelineView-StartTime="00:00:00"  TimelineView-EndTime="23:59:00" OnClientAppointmentInserting="OnClientAppointmentInserting" DayEndTime="23:59:00" FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" EnableDescriptionField="False" AppointmentStyleMode="Default" OnNavigationCommand="RadScheduler1_NavigationCommand"  OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnFormCreated="RadScheduler1_FormCreated" OnTimeSlotCreated="RadScheduler1_TimeSlotCreated" OnClientAppointmentMoveStart="onAppointmentMoveStart" OnClientAppointmentMoveEnd="OnClientAppointmentMoveEnd" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" OnFormCreating="RadScheduler1_FormCreating" OnAppointmentCancelingEdit="RadScheduler1_AppointmentCancelingEdit" OnAppointmentCommand="RadScheduler1_AppointmentCommand" OnAppointmentDelete="RadScheduler1_AppointmentDelete" OverflowBehavior="Auto" OnClientTimeSlotContextMenu="OnClientTimeSlotContextMenu" OnDataBound="RadScheduler1_DataBound" OnResourceHeaderCreated="RadScheduler1_ResourceHeaderCreated"  OnClientAppointmentResizing="OnClientAppointmentResizing" ShowNavigationPane="False"  OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" EnableViewState="True" EnableDatePicker="False" EnableEmbeddedBaseStylesheet="True" EnableEmbeddedScripts="True"   EnableExactTimeRendering="False" EnableEmbeddedSkins="True"  EnableResourceEditing="False" Height="500px"> <TimelineView HeaderDateFormat="dddd , dd/MM/yyyy " ColumnHeaderDateFormat="dddd, dd/MM/yyyy" ShowInsertArea="false" EnableExactTimeRendering="false" />  <TimeSlotContextMenuSettings EnableDefault="false" />

    Thank you.
    Best regards,
    Ei Wai
  10. Plamen
    Admin
    Plamen avatar
    2730 posts

    Posted 23 Sep 2014 Link to this post

    Hello,

    It seems like i could not explain properly enough- please excuse me for that. If you set the ExactTimeRendering  to true the appointment will be displayed according its duration length not according to the timeslots it is in. 

    Hope this will explain the issue and help you achieve the desired functionality.

    Regards,
    Plamen
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  11. Ei Wai
    Ei Wai avatar
    56 posts
    Member since:
    Jul 2014

    Posted 23 Sep 2014 in reply to Plamen Link to this post

    Hi Plamen,

    I see. But even if I tried to set it to true ,my timeslot will extend to next day since schedule ends at next day  4am. So, I think it cannot achieve my desired functionality. Thank you so much for your help.

    Best regards,
    Ei Wai
  12. Plamen
    Admin
    Plamen avatar
    2730 posts

    Posted 25 Sep 2014 Link to this post

    Hello,

    Yes exactly- the appointment will be shown over the next day because its rendering depends on its duration.

    Regards,
    Plamen
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017