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

Client event for double click

5 Answers 64 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Segev
Top achievements
Rank 1
Segev asked on 11 May 2014, 06:42 AM
Hi,

I see there is an event for appointment double click (OnClientAppointmentDoubleClick), but I don't find an event for double clicking an empty timeslot.

Is there an event for that?
If not, how can I implement this?

* Using version 2014.1.403.40

Thanks,
Guy.

5 Answers, 1 is accepted

Sort by
0
Segev
Top achievements
Rank 1
answered on 13 May 2014, 12:26 PM
Workaround:

var rows = $(".rsContentTable tr:gt(0)"); // skip the header row
    rows.each(function (index) {
        $(this).children("td").each(function () {
            $(this).live("dblclick", function () {
                onClientEmptySlotDoubleClick();
            });
        });
    });
0
Nencho
Telerik team
answered on 14 May 2014, 11:50 AM
Hello Guy,

The workaround that you had implemented is the correct one, however I would suggest you to use the on
method instead of live, since it has been deprecated from 1.7 version of jQuery.

Regards,
Nencho
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
Segev
Top achievements
Rank 1
answered on 14 May 2014, 01:23 PM
Thanks.
0
Segev
Top achievements
Rank 1
answered on 01 Jun 2014, 06:48 AM
A fix for my solution:

function addDoubleClickEventToScheduer() {
    var rows = $(".rsContentTable tr:gt(0)"); // skip the header row
    rows.each(function (index) {
        $(this).children("td").each(function () {
            if ($(this).children("div").length == 0) { // No appointments in this td
                $(this).live("dblclick", function () {
                    onClientEmptySlotDoubleClick();
                });
            }
        });
    });
}

It didn't work when there were appointments in the cell.

Guy.
0
Nencho
Telerik team
answered on 03 Jun 2014, 08:46 AM
Hello Guy,

Thank you for sharing your solution with the community.

Regards,
Nencho
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.

 
Tags
Scheduler
Asked by
Segev
Top achievements
Rank 1
Answers by
Segev
Top achievements
Rank 1
Nencho
Telerik team
Share this question
or