EasyUI Forum
March 28, 2024, 07:43:19 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: Check if a cell has focus  (Read 3089 times)
thiago_brum
Newbie
*
Posts: 26


View Profile Email
« on: June 18, 2018, 10:54:25 AM »

How can I check if a cell of eDataGrid has the focus?

    onBeginEdit:function(rowIndex,row){

     var editors = $('#datagrid_item_pedido').datagrid('getEditors', rowIndex);
     var pre_unitario_final = $(editors[1].target);

     pre_unitario_final.numberbox({
      onChange: function(newValue,oldValue) {
       if (pre_unitario_final.is(":focus")) { // DOSN'T WORK
        console.log('focus');
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: June 18, 2018, 08:44:10 PM »

Call the 'textbox' method to get the inputing box.
Code:
var input = pre_unitario_final.numberbox('textbox');
if (input.is(":focus")){
  ...
}
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!