View Full Version : Best way to find the absolute position of an editgrid's input cell?

13 Sep 2010, 6:43 AM
I'm trying to find the absolute position of a cell in an editorgrid to create a popup/iframe/qtip/something need to a cell when a user doubleclicks.

Listening for doubleclick will get me the row,col of the current cell but from there can I find the cell's current position in the browser?

<div class="x-layer x-editor x-small-editor x-grid-editor" id="ext-comp-1025" style="position: absolute; z-index: 11000; visibility: hidden; left: -10000px; top: -10000px; overflow: auto;">
<input type="text" name="" id="ext-comp-1003" autocomplete="off" size="20" class="x-form-text x-form-field" style="width: 139px; height: 16px;"></div>

If I can get the ID of either the editor cell or containing div could I use getEL to find the item's current screen position?

Thanks in advance,

13 Sep 2010, 7:17 AM
on cellclick or celldblclick grid event, use :

listeners: {
cellclick : function(grid, rowIndex, columnIndex, e) {
var XY = Ext.get(e.getTarget()).getXY();

13 Sep 2010, 7:30 AM
Thanks, works great!

I was using a less descriptive listener signature, leaving out e
listeners: { cellclick: function(grid, rowIndex, colIndex)}

Thanks for the quick response.