Answers

Question and Answer:

  Home  Ext JS

⟩ Tell me how to handle event for a extjs component?

a. using listeners config object.

For ex for grid events : listeners: {rowclick: gridRowClickHandler,rowdblclick: gridRowDoubleClickHandler}

b. using addListener( String eventName, Function handler, [Object scope], [Object options] ) : void

Appends an event handler to this component

c. using on( String eventName, Function handler, [Object scope], [Object options] ) : void

Appends an event handler to this element (shorthand for addListener)

For ex: store.on( "datachanged", function( store ){ ..... });

 225 views

More Questions for you: