开发者

EXTJS Find the parent of a node

开发者 https://www.devze.com 2023-01-16 12:08 出处:网络
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 开发者_StackOverflowknow

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 开发者_StackOverflowknow a good way to find the parent of a node?

Thanks


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


You can use the below code:

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

精彩评论

暂无评论...
验证码 换一张
取 消