jQWidgets Forums

jQuery UI Widgets Forums Grid Grid rowdoubleclick

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 12 years, 12 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Grid rowdoubleclick #3222

    Black Moon
    Member

    Hi All!
    How it is possible to handle rowdoubleclick event in jqxGrid instead of rowclick?

    Grid rowdoubleclick #3231

    Peter Stoev
    Keymaster

    Hi Black Moon,

    To handle double clicks, you can do the following:

    Bind to the ‘rowclick’ event and check the time when the event is raised. If the user clicks the same row in a period of 300 milliseconds, then handle the ‘double click’.

    var click = new Date();
    var lastClick = new Date();
    var lastRow = -1;
    $("#jqxgrid").bind('rowclick', function (event) {
    click = new Date();
    if (click - lastClick < 300) {
    if (lastRow == event.args.rowindex) {
    // your code here.
    }
    }
    lastClick = new Date();
    lastRow = event.args.rowindex;
    });

    Hope this helps.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Grid rowdoubleclick #3234

    Black Moon
    Member

    Thanks Petr. Don’t u know default doubleclick time delay? (200, 300, 400 ms)

    Grid rowdoubleclick #3235

    Peter Stoev
    Keymaster

    Hi Black Moon,

    I don’t know the default doubleclick time delay, but as far as I know, the double-click time delay on Windows is 500ms.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.