EasyUI Forum
May 08, 2024, 02:59:53 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: Propertygrid keyboard support  (Read 5445 times)
chkaufmann
Newbie
*
Posts: 15


View Profile Email
« on: February 24, 2014, 06:38:42 AM »

I would like to bind the keydown event for all editors. But I don't find out when/where. In onBeforeEdit the editor doesn't exist yet.

The behaviour should be:
- <F2> calls "beginEdit"
- <enter> calls "endEdit"
- <esc> calls "cancelEdit"

And finally if I click on a combo with editable=false, I would like to force a showPanel without a second click.

cu Christian
« Last Edit: February 24, 2014, 06:40:42 AM by chkaufmann » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: February 25, 2014, 01:12:14 AM »

Please try the code below to get the editor in 'onBeforeEdit' event.
Code:
$('#pg').propertygrid({
    onBeforeEdit:function(index,row){
    var t = $(this);
    setTimeout(function(){
    var ed = t.propertygrid('getEditor', {
    index: index,
    field: 'value'
    });
    console.log(ed)
    },0);
    }
})
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!