Limey
Limey

Reputation: 2772

EXTJS Find the parent of a node

I need to be able to find a parent of a select node in a tree, however, whenever i use ParentNode it always comes up as 'undefined' (and i am not selecting the root). Anybody know a good way to find the parent of a node?

Thanks

Upvotes: 3

Views: 9448

Answers (2)

Gharibi
Gharibi

Reputation: 89

You can use the below code:

let parentNode = Ext.getCmp('YourGridId').getRootNode();

Upvotes: 0

Robusto
Robusto

Reputation: 31883

Maybe you should try parentNode, not ParentNode. JS is case-sensitive.

Upvotes: 11

Related Questions