EasyUI Forum
April 16, 2024, 03:39:24 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: How to set focus on datagrid lines  (Read 8206 times)
pratikk
Newbie
*
Posts: 49


View Profile Email
« on: April 07, 2014, 01:17:17 AM »

I want to set focus on a selected line in datagrid
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


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

Try to get the row element, give it a 'tabindex' attribute, and then do a focus() on it.
Code:
$('#dg').datagrid({
onSelect:function(index,row){
var opts = $(this).datagrid('options');
var tr = opts.finder.getTr(this, index);
tr.attr('tabindex',0);
tr.focus();
}
})
Logged
pratikk
Newbie
*
Posts: 49


View Profile Email
« Reply #2 on: April 07, 2014, 12:14:41 PM »

Thank You . This solved my problem Smiley  This datagrid is realy flexible
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!