EasyUI Forum
September 21, 2017, 12:36:04 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: onClickRow and onDblClickRow on Datagird  (Read 89 times)
lamdang
Newbie
*
Posts: 3


View Profile Email
« on: September 13, 2017, 02:02:13 AM »

I use onClickRow and onDblClickRow on Datagird, data-options="onDblClickRow:func_1,onClickRow:func_2",
I Click Row the func_2 run, I Double-Click Row the func_1 not run but the func_2 run.
Please help me how to use onDblClickRow, thanks!
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3087


View Profile Email
« Reply #1 on: September 13, 2017, 02:12:37 AM »

When double click on a row, the 'onClickRow' and 'onDblClickRow' events all fire.
Logged
lamdang
Newbie
*
Posts: 3


View Profile Email
« Reply #2 on: September 13, 2017, 02:32:13 AM »

Thanks stworthy! how do I use both 'onClickRow' and 'onDblClickRow' events on a datagrid?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3087


View Profile Email
« Reply #3 on: September 13, 2017, 02:48:36 AM »

Bind these two events together, please look at the code below:
Code:
$('#dg').datagrid({
onClickRow: function(){
console.log('click row')
},
onDblClickRow: function(){
console.log('dblclick row')
}
})
Logged
lamdang
Newbie
*
Posts: 3


View Profile Email
« Reply #4 on: September 13, 2017, 05:02:41 PM »

I run your code but it only show 'click row' all the events, thanks tsworthy!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!