Disable Dragging Handles

6 posts, 0 answers
  1. digitall
    digitall avatar
    169 posts
    Member since:
    Jun 2006

    Posted 14 Feb 2013 Link to this post

    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.
  2. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 19 Feb 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. digitall
    digitall avatar
    169 posts
    Member since:
    Jun 2006

    Posted 19 Feb 2013 Link to this post

    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)?
  5. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 21 Feb 2013 Link to this post

    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.
  6. Vasssek
    Vasssek avatar
    143 posts
    Member since:
    Aug 2010

    Posted 13 Nov 2015 in reply to Boyan Dimitrov Link to this post

    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

  7. Bozhidar
    Admin
    Bozhidar avatar
    1103 posts

    Posted 18 Nov 2015 Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017