how to remove listener from cell editing plugin in ExtJs? -


can please me out here ?

i want remove beforeedit listener @ runtime cell editing plugin.

i added listener on plugin using following code.

var gridplugin = ext.getcmp(gridid).getplugin(pluginid); gridplugin.addlistener(eventname,function(editor,e,eopts){callbackfunction(editor, e, eopts);}); 

but not able remove listener.

i trying following code.

var gridplugin = ext.getcmp(gridid).getplugin(pluginid); gridplugin.removelistener(eventname); 

thanks in advance,

ext.grid.plugin.cellediting.removelistener's signature is: ( eventname, fn, [scope] ) (see documentation) means, apart supplying event name listener should detached, need provide listener function well. code should work be:

var gridplugin = ext.getcmp(gridid).getplugin(pluginid),     listnerfunction = function(editor,e,eopts){callbackfunction(editor, e, eopts);}  gridplugin.addlistener(eventname,listnerfunction); 

then

var gridplugin = ext.getcmp(gridid).getplugin(pluginid); gridplugin.removelistener(eventname, listenerfunction); 

note need have reference listenerfunction available when detaching it.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -