EasyUI Forum
September 13, 2025, 09:22: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: events of datagrid editors  (Read 11259 times)
dailyblog
Newbie
*
Posts: 30


View Profile Email
« on: December 16, 2012, 06:54:49 PM »

i got this demo at  http://www.jeasyui.com/tutorial/datagrid/datagrid15.php  .
how to bind event to editors of combogrid ,datebox & combobox except  that of text & numberbox.
my code is as below ,but it does not work.
Code:
            onClickRow:function(rowindex,rowdata){
               
                if(lastindex!=rowindex){
                    $("#grid").datagrid("endEdit",lastindex);
                    $("#grid").datagrid("beginEdit",rowindex);
                    }
                    else
                    {$("#grid").datagrid("beginEdit",rowindex);}
                    lastindex=rowindex;
                   
                    var editors=$("#grid").datagrid("getEditors",rowindex);
                    e_mail=editors[0].target ;
                   
                    e_mail.bind('keydown',function(e){
                       alert('fffff');
                    });
the Filed type is combogrid.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: December 16, 2012, 09:06:16 PM »

Try the following code to bind 'keydown' event for the text box of combo and its dependent components.
Code:
var editors=$("#grid").datagrid("getEditors",rowindex);
$(editors[0].target).combo('textbox').bind('keydown',function(){
  // ...
});
Logged
dailyblog
Newbie
*
Posts: 30


View Profile Email
« Reply #2 on: December 16, 2012, 10:46:53 PM »

thanks. it works ok now. Smiley
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!