-
29 Jul 2008 5:41 AM #1
Mouseover not showing first row
Mouseover not showing first row
I'm trying to show the contents of a GridPanel row in an different div when hovering over the row.
I've gotten it working with the following mosueover function, but for some reason, the first row never returns a result:
it seems that findRowIndex returns null when moving over the first row.Code:var onMouseover = function(e, t) { var grid = Ext.getCmp('myGrid'); var row; if((row = grid.getView().findRowIndex(t)) != false){ var record = grid.store.getAt(row); } if(record) { showDetails(record); } }
Any suggestions?
Thanks.
-
29 Jul 2008 5:54 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,169
- Vote Rating
- 28
(0 == false)
try:
row = grid.getView().findRowIndex(t)) > 0
Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.
-
29 Jul 2008 6:06 AM #3
Ah yes-- the problem is that the first row has index 0.
changing to
row = grid.getView().findRowIndex(t)) !== false
fixed the problem.


Reply With Quote