EasyUI Forum
November 04, 2025, 04:25:45 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: datagrid global event listener  (Read 6224 times)
gtoma
Newbie
*
Posts: 1


View Profile
« on: March 07, 2014, 03:34:10 AM »

Hi all,

i want to put in datagrid, and much button.

i have a global event listener:
(simplifying)
Code:
$(document).on('click', function() { 
   console.log('trallala');
    …
}); 

what happens:
Loading the page, and run the listener.

An onclick event add a datagrid.

The datagrid formatter add buttons for all row.

error:
The global event listener dont catch on the buttons.

how can i enabled this global event listener?

te real event listener:
Code:
$(document).on('click', '[data-ajaxobj]:not([data-ajaxobj=""])', function(){   
      console.log('opopo'); 
      var json = $(this).data('ajaxobj');var win = $(this).data('win');         
      if( !$.isPlainObject(json) || typeof json !== 'object' ) {json = jQuery.parseJSON( json.replace(/'/g, '"') );} 
          if( win != "" && win != undefined) { 
              if( AdminControll.Windows[win] == undefined  ) {AdminControll.addWindow( json );   
              } else {AdminControll.Windows[win].AjaxObj.Start( json );} 
          } else {new AjaxObj().Start( json );} 
      return false; 
});
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!