EasyUI Forum
March 29, 2024, 07:48:50 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: [SOLVED] Datagrid onDblClickRow focus text  (Read 896 times)
jega
Full Member
***
Posts: 190


View Profile
« on: November 09, 2022, 02:33:12 PM »

Hi.

Can't find the solution.

When dblclick a row, on the text, the text is highlighted. How to get rid of this.


Regards Jesper
« Last Edit: November 10, 2022, 03:48:22 AM by jega » Logged
jarry
Administrator
Hero Member
*****
Posts: 2260


View Profile Email
« Reply #1 on: November 10, 2022, 02:01:11 AM »

Clear the selection when dblclick a row. Please refer to the code below.
Code:
$('#dg').datagrid({
onDblClickRow: function(index,row){
if (window.getSelection){
window.getSelection().removeAllRanges();
} else if (document.selection){
document.selection.empty();
}
}
})
Logged
jega
Full Member
***
Posts: 190


View Profile
« Reply #2 on: November 10, 2022, 03:48:02 AM »

Thanks Jarry

Works fine

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!