This is a migrated thread and some comments may be shown as answers.
RadContextMenu
1 Answer 21 Views
This is a migrated thread and some comments may be shown as answers.
Damien McCarron
Top achievements
Rank 1
Damien McCarron asked on 24 Feb 2010, 04:18 PM
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

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 25 Feb 2010, 06:48 AM
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.
Asked by
Damien McCarron
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Share this question
or