EasyUI Forum
April 28, 2024, 07:26:39 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: working with combo editor in datagrid-cellediting  (Read 5870 times)
korenanzo
Guest
« on: June 28, 2016, 12:58:07 AM »

I use data grid-cellediting

I have comboboxes and combogrid as cell editors

in
onCellEdit I've managed to bind events on the input field

because even when in edit mode I need to move on other cells and rows, so I've binded onkeydown to check thearrowkeys .

the problem arises when I have a combobox as input field:
pressing arrow down, for example,
if the combo panel is closed I want to jump to the next row/cell
else I want to move into the panel rows
the question is

when I am into the onkeydown event  , how can I reach the whole combobox object, to check if the panel is visible?

note that if I ask $(this).data() I obtain only a validatebox object, with the options.

Thanks

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


View Profile Email
« Reply #1 on: June 28, 2016, 04:56:18 PM »

You can call 'getEditor' method to get the current editor and then get the combo object.
Code:
onCellEdit: function(index,field,value){
var input = $(this).datagrid('input', {index:index,field:field});
if (input){
if (value != undefined){
input.val(value);
}
var ed = $(this).datagrid('getEditor', {index:index,field:field});
var cc = $(ed.target);
console.log(cc)
}
}
Logged
korenanzo
Guest
« Reply #2 on: June 29, 2016, 06:51:00 AM »

gotit, thanks
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!