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

Disable Double-Click Edit, Allow Context-Menu Edit

5 Answers 422 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Rick
Top achievements
Rank 1
Rick asked on 23 Jan 2015, 04:58 PM
We have a radScheduler and we want the users to right-click to bring-up a context menu in order to edit.  This allows us to present a set of choices specific to the day or the appointment they are editing.  It gives us greater control.

We do not want them to be able to double-click the day or appointment.  We want double-clicking to do absolutely nothing.

How can this be accomplished?

5 Answers, 1 is accepted

Sort by
0
Rick
Top achievements
Rank 1
answered on 23 Jan 2015, 05:31 PM
To clarify:

We want to disable DoubleClicking for Inserts.  
We want to allow Inserts via the context menu.
0
Accepted
Hristo Valyavicharski
Telerik team
answered on 28 Jan 2015, 05:09 PM
Hi Rick,

The context menu is enabled by default, so you just need to disable the time slot clicking. This can be done with jQuery:

function pageLoad() {
    $('.rsContentTable td').click(function (e) {
        e.stopPropagation();
    }).dblclick(function (e) {
        e.stopPropagation();
    });
}

I hope this helps.

Regards,
Hristo Valyavicharski
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
Rick
Top achievements
Rank 1
answered on 28 Jan 2015, 07:07 PM
Thank you, that worked well for us.
0
Erick Burgess
Top achievements
Rank 1
answered on 07 Oct 2016, 02:58 PM
I am having a problem with the stopPropagation solution above. This is disabling double click events on both the empty time slots as well as the appointments. I would like to disable ONLY the empty time slot double click event and keep the appointment double clicks.
0
Anton
Telerik team
answered on 12 Oct 2016, 11:35 AM
Hi Erick,

You could use the OnClientAppointmentInserting event as in the following code:

var $ = $telerik.$;
 
function OnClientAppointmentInserting(sender, args) {
    var isContextMenuVisible = $('ul.rmActive.rmVertical.rmGroup.rmLevel1').is(":visible");
 
    if (!isContextMenuVisible) {
        args.set_cancel(true);
    }
}

Regards,
Anton
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Scheduler
Asked by
Rick
Top achievements
Rank 1
Answers by
Rick
Top achievements
Rank 1
Hristo Valyavicharski
Telerik team
Erick Burgess
Top achievements
Rank 1
Anton
Telerik team
Share this question
or