Cancelling OnClientAppointmentDoubleClick

4 posts, 0 answers
  1. Joe Buckle
    Joe Buckle avatar
    47 posts
    Member since:
    Nov 2009

    Posted 24 Dec 2009 Link to this post

    Good day!

    Is there anyway to cancel the OnClientAppointmentDoubleClick event without setting the AllowEdit="false"? I want the user to be able to drag the appointment to change the start and end time of an appointment, but without allowing them to edit it via the simple/advanced form.

    Thank you very much.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 24 Dec 2009 Link to this post

    Hello Joe,

    Attach 'OnClientAppointmentEditing' event and cancel the event in order to prevent editing of appointment.

    javascript:
     
    <script type="text/javascript"
        function OnClientAppointmentEditing(sender, args) { 
            args.set_cancel(true); 
        } 
    </script> 

    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Muhammad
    Muhammad avatar
    2 posts
    Member since:
    Apr 2014

    Posted 09 Apr 2014 in reply to Shinu Link to this post

    I don't want popup to appear but it does even after  eventArgs.set_cancel(true);
    Please help!
  5. Muhammad
    Muhammad avatar
    2 posts
    Member since:
    Apr 2014

    Posted 09 Apr 2014 Link to this post

    Problem is solved:
    Because it was recurring event, I should have caught following event:
    function OnClientAppointmentEditing(sender, eventArgs)
    {
    if(eventArgs.get_editingRecurringSeries())
    eventArgs.set_cancel(true);
    }

    This works
Back to Top