View Full Version : Selecting Item in List

27 Jul 2011, 1:44 PM
I am trying to select and scroll to an item in a List, but I cannot get it to work. I have tried several methods including this http://www.sencha.com/forum/showthread.php?106824-Scroll-to-an-selected-Item-in-a-List

my current code is for this portion is

var listId = this.TeamStore.find('id',record.data.id);
var ehtml = this.teamList.getNode(listId);
var el = Ext.get(ehtml);
var xcoord = el.getY()-this.teamList.getHeight();
var ycoord = el.getX();

In this code, record.data.id is valid, and listId is set to the correct value. However teamList.select() has the error: Uncaught TypeError: Cannot call method 'addCls' of null
getNode returns an undefined object.

Is there something wrong with using select() on a list object?

27 Jul 2011, 2:58 PM
I tried out List.select and it works fine. Are you using the latest version 1.1?

27 Jul 2011, 3:15 PM
Yes, I am.
Is there any way that select could return an error on a valid store id returned by store.find()?