views:

313

answers:

1

I would like to add a tooltip with some extra data to each row in a dojox.grid.DataGrid. I have tried to create an onCellMouseOver handler, but I can't get the data item data out of the event object I'm getting.

What is the best way to add a tooltip to a DataGrid row?

A: 

In your onCellMouseOver you can get the row index (e.rowIndex). From that you can get the item from the grid assuming you are using an ItemFileReadStore (I have not tried it with a ItemFileWriteStore)

function cellMouseOver (e) { var rowIndex = e.rowIndex; var item = grid.getItem(e.rowIndex); }

Alex Jacobson