Client event for double click

6 posts, 0 answers
  1. Segev
    Segev avatar
    27 posts
    Member since:
    Sep 2010

    Posted 11 May 2014 Link to this post

    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.
  2. Segev
    Segev avatar
    27 posts
    Member since:
    Sep 2010

    Posted 13 May 2014 in reply to Segev Link to this post

    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();
                });
            });
        });
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 14 May 2014 Link to this post

    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.

     
  5. Segev
    Segev avatar
    27 posts
    Member since:
    Sep 2010

    Posted 14 May 2014 in reply to Nencho Link to this post

    Thanks.
  6. Segev
    Segev avatar
    27 posts
    Member since:
    Sep 2010

    Posted 01 Jun 2014 Link to this post

    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.
  7. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 03 Jun 2014 Link to this post

    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.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017