EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: mzeddd on January 14, 2018, 10:22:10 AM



Title: onLongClick event for treegrid and grid (and other where onclick exists)
Post by: mzeddd on January 14, 2018, 10:22:10 AM
Hello,

I just want to ask if it is possible to add onLongClick event for treegrid and grid plugins?

Thanks!


Title: Re: onLongClick event for treegrid and grid (and other where onclick exists)
Post by: jarry on January 15, 2018, 12:23:37 AM
There is no native longclick event. You have to implement it and attach it to the 'rowEvents' of datagrid.
Code:
$('#dg').datagrid({
rowEvents: $.extend({}, $.fn.datagrid.defaults.rowEvents, {
longclick: function(e){
//...
}
})
})