View Full Version : Accessing parent item of a submenu?

9 Feb 2010, 3:29 PM
Hi everybody. I'm new to ExtJS and I started using it just few days ago and I'm enthusiastic.
My question could be naive.
I have a menu in which an item is checkable and has a DateMenu as a submenu. I would like to be able to check on the item as soon as the user choose a date. At the moment I'm able to get the date, and to fire a function via the handler of the DateMenu, but I don't know how to refer to the parent item of the DateMenu. I was looking around in the api docs, in tutorials about menus and in the forum, but pointlessly.
I wonder if there is a way: I think there should be and should be also easy.
Any help would be greatly appreciated. Thank you.

10 Feb 2010, 1:39 AM
Hi, mau

Maybe findParentBy (http://www.extjs.com/deploy/dev/docs/source/Component.html#method-Ext.Component-findParentBy) or findParentByType (http://www.extjs.com/deploy/dev/docs/source/Component.html#method-Ext.Component-findParentByType) functions will help you?