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

Disable Dragging Handles

5 Answers 111 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
digitall
Top achievements
Rank 1
digitall asked on 15 Feb 2013, 03:28 AM
Is it possible to disable the dragging handles on an appointment entry? I'm not trying to disable editing completely (the context menu needs to remain enabled), just prevent a user from dragging the entry to extend the time.

5 Answers, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 19 Feb 2013, 12:18 PM
Hello,

An easy and convenient way of preventing user from resizing an appointment would be to subscribe for OnClientAppointmentResizing client-side event and cancel the appointment resizing.
//markup code

<telerik:RadScheduler ID="RadScheduler1" runat="server" OnClientAppointmentResizing="ClientAppointmentResizing" ....>
</telerik:RadScheduler>

//JavaScript
function ClientAppointmentResizing(sender, args) {
    args.set_cancel(true);
}


Regards,
Boyan Dimitrov
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.
0
digitall
Top achievements
Rank 1
answered on 19 Feb 2013, 04:28 PM
Is it possible to also hide the handlebar itself as well? Or will this prevent the drag from even occurring (vs. just making it snap back)?
0
Boyan Dimitrov
Telerik team
answered on 21 Feb 2013, 03:45 PM
Hello,

Indeed you could hide the handlebar using a custom style as shown in the code snippet below:
//style
<style type="text/css">
    html .RadScheduler .rsAptResize {
        cursor: default;
    }
</style>


Regards,
Boyan Dimitrov
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.
0
Vasssek
Top achievements
Rank 1
answered on 13 Nov 2015, 01:34 PM

Hello,

I have problem with cancellation of resizing time slot. Even I used above js script, RadScheduler1_AppointmentUpdate event still fired on server side. Here is my scheduler declaration:

<telerik:RadScheduler ID="RadScheduler1" RenderMode="Auto" Height="860px" RowHeight="27" runat="server" StartEditingInAdvancedForm="false" HoursPanelTimeFormat="HH" ShowAllDayRow="false" ShowFullTime="true" ShowFooter="false" FirstDayOfWeek="Monday" LastDayOfWeek="Sunday"
                   OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" OnAppointmentDelete="RadScheduler1_AppointmentDelete" OnClientAppointmentEditing="AppointmentEditing" OnClientAppointmentInserting="AppointmentInserting" OnClientAppointmentResizing="OnClientAppointmentResizing"
                   OnTimeSlotCreated="RadScheduler1_TimeSlotCreated" OnNavigationComplete="RadScheduler1_NavigationComplete"  OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" CustomAttributeNames="OrderID, OrderTypeID, OrderNumber, CustomerCompanyDesc, Article, ColliNumber, Weight, Note, CostCenter, Segment, PlaceNameDesc2, ForwarderName, TruckPlate, SemiTrailerPlate, StatusText1, StatusColor, LoadingOffloadingPlaceID">
                   <MonthView UserSelectable="false" />
                   <TimelineView UserSelectable="false" />
                   <AppointmentTemplate>
                       <div style="padding-top: 1px;" id="appointmentDIV">
                           [<b><%# Eval("OrderNumber") %></b>]; 
                           <span>
                               <b><%# Eval("OrderTypeID").ToString() == "0" ? "Odb." : "Dod."%></b> - <%# Eval("CustomerCompanyDesc") %>;
                           </span>
                           <div>
                               <span style="float: left; margin-top: 4px;"><b>Tovar</b> - <%# Eval("Article") %>.</span>
                           </div>
                       </div>
                   </AppointmentTemplate>
               </telerik:RadScheduler>

 

Plese help me to solve this issue...

Best regards

 Vasssek

0
Bozhidar
Telerik team
answered on 18 Nov 2015, 09:11 AM
Hi,

If you want to prevent the drag you have to handle the OnClientAppointmentResizeEnd event:
<script type="text/javascript">
    function OnClientAppointmentResizeEnd(sender, args) {
        args.set_cancel(true);
    }
</script>
<telerik:RadScheduler runat="server" ID="RadScheduler1"
    OnClientAppointmentResizeEnd="OnClientAppointmentResizeEnd">
</telerik:RadScheduler>


Regards,
Bozhidar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Scheduler
Asked by
digitall
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
digitall
Top achievements
Rank 1
Vasssek
Top achievements
Rank 1
Bozhidar
Telerik team
Share this question
or