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

RadScheduler to show one timeslot only

10 Answers 231 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Ei Wai
Top achievements
Rank 1
Ei Wai asked on 10 Sep 2014, 08:36 AM
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

10 Answers, 1 is accepted

Sort by
0
Accepted
Boyan Dimitrov
Telerik team
answered on 12 Sep 2014, 03:09 PM
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.

 
0
Ei Wai
Top achievements
Rank 1
answered on 15 Sep 2014, 01:29 AM
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
0
Ei Wai
Top achievements
Rank 1
answered on 15 Sep 2014, 04:30 AM
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
0
Boyan Dimitrov
Telerik team
answered on 17 Sep 2014, 12:32 PM
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.

 
0
Ei Wai
Top achievements
Rank 1
answered on 18 Sep 2014, 02:49 AM
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.
0
Plamen
Telerik team
answered on 22 Sep 2014, 05:19 AM
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.

 
0
Ei Wai
Top achievements
Rank 1
answered on 23 Sep 2014, 02:23 AM
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
0
Plamen
Telerik team
answered on 23 Sep 2014, 09:53 AM
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.

 
0
Ei Wai
Top achievements
Rank 1
answered on 24 Sep 2014, 02:08 AM
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
0
Plamen
Telerik team
answered on 25 Sep 2014, 05:12 AM
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.

 
Tags
Scheduler
Asked by
Ei Wai
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Ei Wai
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or