EasyUI Forum
September 15, 2025, 02:20:30 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: Select onHover on easyUI datagrid  (Read 8824 times)
aswzen
Sr. Member
****
Posts: 287


Indonesian

aswzen
View Profile WWW Email
« on: July 09, 2014, 07:43:50 PM »

i think it would be great if onHover method is exist on easyUI datagrid...
or i just missed it?

example..how to make we just selected the data when our cursor hovering them..?

Smiley
Logged

Regards,
Sigit

- Indonesian jEasyUI Facebook page : https://www.facebook.com/groups/jeasyuiid/
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: July 10, 2014, 04:28:07 AM »

No 'onHover' event exists in datagrid plugin. You have to achieve this functionality manually, please try the code below:
Code:
$('#dg').datagrid({
  onLoadSuccess:function(){
    var target = this;
    var opts = $(target).datagrid('options');
    opts.finder.getTr(target,0,'allbody').each(function(){
      $(this).bind('mouseenter',function(){
        $(target).datagrid('selectRow', $(this).attr('datagrid-row-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!