Hello,
A have my menu set to WebMenuStyle = WinClient. The menu has three levels:
Actions/Send To.../Inbox, Trash
If the user clicks Inbox or Trash the MenuItemClicked server-side event fires. That's ok. However, if he clicks Send To... the event is fired as well. I wasn't expecting that behavior, since Send To... is not a leaf of the tree.
Now, if the user clicks Actions nothing happens. That behavior doesn't seem consistent to me.
Is there a way to make non-leaf Items non clickable, or maybe cancel the event on the client side?
I hope I get the scenario right - but I believe this KB Devcenter article is exactly what you need:
http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=8625
Basically, you can implement a client-side event handler to check non-leaf items and cancel postback for them.
function itemClickHandler(menuID, itemID) { var item = igmenu_getItemById(itemID); var menu = igmenu_getMenuById(menuID); var child = item.getFirstChild(); if (child != null) { menu.NeedPostBack = false; menu.CancelPostBack = true; } else { menu.NeedPostBack = true; menu.CancelPostBack = false; } }
Hi Rumen.
Thanks for the quick answer. That's exactly what I needed.
Oscar.