Ext-JS Question:

Tell me how to handle event for a extjs component?

Tweet Share WhatsApp

Answer:

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 ){ ..... });

Download Ext JS PDF Read All 65 Ext JS Questions
Previous QuestionNext Question
Tell me what is parent class for all stores in extjs? how many stores exists?Explain how to find no of records in a store?