This is a migrated thread and some comments may be shown as answers.

Collapse Menu with Item Select

1 Answer 62 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Levi
Top achievements
Rank 1
Levi asked on 11 Nov 2008, 10:47 PM
Is there a property to automatically collapse the menu when an item has been selected? I'm using an item template, so I'm assuming this might not be built in... If not, what is the best way to go about this?

Thanks,
Levi

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 12 Nov 2008, 11:58 AM
Hi Levi,

You can add onclientitemclicked="ItemClicked" to RadMenu, in order to close the menu on clicking any opened RadMenu item. Please find the below code snippet for ItemClicked event.

JavaScript
<script type="text/javascript">  
function ItemClicked()  
{  
   var menu = $find("<%=RadMenu1.ClientID %>");           
   menu._openedItem.close();  
}  
</script> 

Thanks,
Princy.
Tags
Menu
Asked by
Levi
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or