EasyUI Forum
May 03, 2024, 11:07:33 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Datagrid hover  (Read 11005 times)
peter
Newbie
*
Posts: 10


View Profile
« on: April 07, 2014, 01:32:31 AM »


I would like to take an action when the mouse hovers over a grid line. Is there any way to do this?
If so, how would I be able to tell which line the mouse was hovering over?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: April 07, 2014, 07:22:36 AM »

You can bind 'mouseover' event to each rows when loaded data successfully.
Code:
	$('#dg').datagrid({
onLoadSuccess:function(){
$(this).datagrid('getPanel').find('tr.datagrid-row').bind('mouseover',function(e){
var index = parseInt($(this).attr('datagrid-row-index'));
console.log(index);
})
}
})
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!