Disable right click or double click on RadScheduler

3 posts, 0 answers
  1. Amit
    Amit avatar
    10 posts
    Member since:
    Feb 2011

    Posted 24 Feb 2011 Link to this post

    Hi Telerik Team,

    I want to restrict adding new appointments on to the scheduler i.e. it wont be possible to add a new appointment either by right click or double click.

    i have tried to use read only property but it didn't work. So what is the other solution to restrict adding the new appointments.?

    Also i want to change the text while adding a new appointment i.e. "new appointment" to any text on right clicking the scheduler.

    So how do i change the text.?

    Thanks & Regards
    Amit Thakkar
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 25 Feb 2011 Link to this post

    Hello Amit,

    You can set the e AllowInsert to false to prevent the insertion of new appointments on double clicking. For canceling the insertion on RightClick, cancel the event by subscribing the OnClientTimeSlotContextMenuItemClicking event.

    You can add your custom text by setting the property Localization-ContextMenuAddAppointment
    aspx:
    <telerik:RadScheduler ID="RadScheduler1" Localization-ContextMenuAddAppointment="Add the appointment" StartEditingInAdvancedForm="true" TimeSlotContextMenuSettings-EnableDefault="true"  AllowInsert="False" OnClientTimeSlotContextMenuItemClicking="CancelInserting">
    </telerik:RadScheduler>

    clientside:
    function CancelInserting(sender, args)
     {
    if (args.get_item().get_text() == "Add the appointment") // Here "Add the appointment" is the TimeSlotContextMenuItem text
          {
               args.set_cancel(true);
               alert("can't insert");
          }
       }

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Amit
    Amit avatar
    10 posts
    Member since:
    Feb 2011

    Posted 25 Feb 2011 Link to this post

    Hello Shinu,

    Thanks for the reply. It worked.

    Regards
    Amit Thakkar
Back to Top