5 Answers, 1 is accepted
In order to achieve the described functionality, you could handle the jQuery dbclick event . For example:
<
div
id
=
"grid"
></
div
>
...
<
script
>
$("#grid").kendoGrid({
...
});
$("#grid").delegate("tbody>tr", "dblclick", function(){});
</
script
>
Regards,
Iliana Nikolovathe Telerik team
jQuery dblclick event does not work on a phone. There are a lot of posts about getting double click to work with Kendo and the solution cannot work with a phone, because jQuery doesn't support it.
You need to use something like this as a way to create an extension event for "doubletap": https://gist.github.com/attenzione/7098476
The Kendo UI Touch widget implements a doubleTap event, which you can use to capture such an action from the user. You can see a demo here:
Touch Events Demo
and documentation of the widget here:
Touch Events
Regards,
Tsvetina
Telerik by Progress
Hi Tsvetina,
I resurrected this old thread because I found about 10 other forum threads asking the same thing and all of them had an incomplete answer, but this one was the shortest. The problem isn't the need for yet another widget... the problem is that the advice to use the jQuery double-click event in a grid row doesn't working on phone devices, because jQuery doesn't support double-click events on mobile devices unless you load jQuery Mobile too (which is something a lot of people don't want to do once they go down the path of using something like Kendo or Bootstrap).
What would be totally cool is to have a way to better integrate phone gesture events in the different Kendo widgets. So that way, for example, if I wanted to use a swipe gesture to delete a row in a grid, it's just an event in the grid I can tap into without having to create the event myself.
What you describe is achievable with the Touch widget, or maybe widget is not the best reference. This is just a component that lets you listen for touch events on any element, including Grid rows.
One reason for creating a separate widget is that the logic for listening for touch events differs between operating systems and browsers and this is the most convenient way to have all needed code at one place.
Additionally, Grid and other widget events are related to certain features and user actions related to them, they are not general DOM events.
To demonstrate that using the Touch widget together with a complex widget is easy, I prepared the following demo, which lets you delete Grid rows on right swipe action:
http://dojo.telerik.com/@tsveti/ACubu/4
Regards,
Tsvetina
Telerik by Progress