Kld
Kld

Reputation: 7068

Extjs 4 GridPanel: how can I get the row-index (position) of an element by id

How do you get the row-index (position) of a row by the id in an ExtJS GridPanel?

Upvotes: 7

Views: 25717

Answers (2)

mustafa.0x
mustafa.0x

Reputation: 1506

Ext.data.Store.indexOfId

var rowIndex = store.indexOfId(id);

Upvotes: 6

Molecular Man
Molecular Man

Reputation: 22386

use store.indexOf method:

var record = store.getNodeById(id),
    rowIndex = store.indexOf(record);

Upvotes: 15

Related Questions