Title: Add "OnSelect" event listner, without override the existing event listner Post by: Shon on January 21, 2015, 12:22:25 AM Hello dear friends,
I am trying to add another event listner for "onSelect" event without overriding the existing one, but i dont know thow to do this. I initialize the combogrid like this: jobjInput.combogrid({ url: strUrl, mode: 'remote', ..... onSelect: function() { ... } }); and after that trying to add another event listner to the input like this: jobjInput.combogrid({ onSelect: function() { ... } }); but if i do it in this way, the original "onSelect" event not raised. apperantly there is another way to add event listener, can you please direct me what is the way? I searched the web without success Thank u very much, Shon Title: Re: Add "OnSelect" event listner, without override the existing event listner Post by: stworthy on January 21, 2015, 09:04:14 AM Please try to extend the 'attachEvent' method for the combogrid component.
Code: $.extend($.fn.combogrid.methods, { Call 'attachEvent' method to add your own event handler. Code: jobjInput.combogrid('attachEvent',{ Title: Re: Add "OnSelect" event listner, without override the existing event listner Post by: Shon on January 22, 2015, 03:07:45 AM Thank you very very much stworthy, its works great!!!
Title: Re: Add "OnSelect" event listner, without override the existing event listner Post by: Opan Mustopah on March 15, 2015, 08:33:05 AM thanks stowrthy for the extended method. but it's not working when i try other event like 'onChange',
Code: $(zone_id_dest.target).combogrid('attachEvent',{ i check the console but it won't show up. thanks |