EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: StefaanEeckels on November 13, 2015, 06:56:26 AM



Title: propertyGrid: Tab between editable cells
Post by: StefaanEeckels 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


Title: Re: propertyGrid: Tab between editable cells
Post by: stworthy 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;
}
})
}
})


Title: Re: propertyGrid: Tab between editable cells
Post by: StefaanEeckels on November 17, 2015, 03:36:13 AM
Thanks a million stworthy! As always, your solutions work.