I am using a web-automation tool against a site that utilizes an ExtJS grid, and would like to run some JavaScript that would simulate the ‘onlick’ event of a row… When I fire a regular onclick event on the respective div tags, nothing happens.
I did an ‘Ext.version’ and got 2.2, so I looked up the Ext 2.2 API here: http://extjs.edspencer.net/extjs/docs/ but I cannot really make sense of it. I am not concerned with creating a new grid but manipulating an existing one.. Any ideas?
You need to look at events on the GridPanel. There’s a
rowclickevent. You can then apply a listener to the grid, either in the grid config:Or after the fact:
But if you want to fire the onclick event, as you stated, do the following:
Source, the Observable object. Almost everything inherits from Observable in ExtJS 2:
http://extjs.edspencer.net/extjs/docs/#Ext.util.Observable