3

I am using the Dojo EnhancedGrid, and this problem ONLY occurs when another cell is being edited on the same row and I click to a new cell:

In both the onRowClick(e) and onCellClick(e) events under this circumstance, the DOM node passed in for the cell does not appear to be the "real" DOM node for the cell in the grid -- it appears to be some sort of clone. I know this because:

  1. e.cellNode.getBoundingClientRect() returns all 0s (incorrect).

  2. Getting the DOM node manually by trial and error through dojo.query(...) gives me a node who's node.getBoundingRect() call returns the correct screen rectangle for it.

So, I need to get the "correct" DOM node so I can place a tooltip dialog at it without it being placed at the top left of the screen due to the incorrect getBoundingClientRect() result. This is not easy, as the cell DOM elements have a idx=XXX attribute for their column index, but neither the cell nor the row DOM elements appear to have a rowIndex. So, I can't figure out a way to verify that a particular cell DOM node I'm getting from Dojo.query() is the actual cell for the rowIndex/colIndex I want.

Does anyone have a workaround? Basically how to get the real DOM node in grid.onCellClick() given a rowIndex and colIndex in this situation? Again, e.cellNode is not working in this case because of a bug in the grid.

Roberto Olivares
  • 953
  • 1
  • 9
  • 17

1 Answers1

0

This is what I am using, if you are sure about when you call this event, your domNodes are updated:

var rowNode = dojo.query(e.target).closest(".dojoxGridRow")[0];
Taryn
  • 224,125
  • 52
  • 341
  • 389
Vin.X
  • 4,595
  • 3
  • 26
  • 35