RadContextMenu

2 posts, 0 answers
  1. Damien McCarron
    Damien McCarron avatar
    9 posts
    Member since:
    Jan 2010

    Posted 24 Feb 2010 Link to this post

    Hi

    I have a TabStrip where I have attached a custom attribute so I can uniquely identify each tab. I also have a ContextMenu attached to the TabStrip.

    I can find the text of the tab (args.get_targetElement().innerHTML) that menu was accessed from but is there any way I can find out the custom attributes of the tab in question?

    Thanks
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 25 Feb 2010 Link to this post

    Hello Damien,

    You can find out the corresponding RadTabStrip using the findItemByText method and use the get_attributes() method as shown below.

    JavaScript:
     
    function OnClientItemClicked(sender, args) { 
            alert(args.get_targetElement().innerHTML); 
            var tabstrip = $find("<%=RadTabStrip1.ClientID %>"); 
            var item = tabstrip._findItemByText(args.get_targetElement().innerHTML); 
            alert(item.get_attributes().getAttribute('attributeName')); 
        } 

    -Shinu.
Back to Top