EasyUI Forum
May 17, 2024, 08:14:43 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: propertyGrid: Tab between editable cells  (Read 4608 times)
StefaanEeckels
Newbie
*
Posts: 12


View Profile
« on: November 13, 2015, 06:56:26 AM »

Hi Forum,

Does anyone know if it is possible to Tab from one editable field in a propertyGrid to the next? The fields aren't genuine HTML input fields, so hitting Tab while in a propertyGrid moves the cursor to the browser's URL entry field. This happens in the live demo examples as well.

Thanks and take care,

Stefaan
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: November 15, 2015, 07:19:36 AM »

Please try this code:
Code:
$('#pg').propertygrid({
onBeginEdit: function(index,row){
var pg = $(this);
var ed = pg.propertygrid('getEditors', index)[0];
var t = $(ed.target);
var t = $(ed.target).hasClass('textbox-f') ? $(ed.target).textbox('textbox') : $(ed.target);
t.unbind('.propertygrid').bind('keydown.propertygrid', function(e){
if (e.keyCode == 9){
var tr = pg.propertygrid('options').finder.getTr(pg[0], index+1, 'body', 2);
tr.find('.datagrid-cell').trigger('click');
return false;
}
})
}
})
Logged
StefaanEeckels
Newbie
*
Posts: 12


View Profile
« Reply #2 on: November 17, 2015, 03:36:13 AM »

Thanks a million stworthy! As always, your solutions work.
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!