Hi Michael,
This is not possible out of the box. Once the item loads its child items from WebService, its expand mode is set to client-side, so the items are cached.
To workaround this I suggest that you subscribe to the
OnClientItemClosed event and define its event handler as follows:
function OnClientItemClosedHandler(sender, eventArgs) |
{ |
var item = eventArgs.get_item(); |
sender.trackChanges(); |
//clear the child items |
item.get_items().clear(); |
//set the expand mode back to WebService |
item.set_expandMode(Telerik.Web.UI.MenuItemExpandMode.WebService); |
item._itemsLoaded = false; |
sender.commitChanges(); |
} |
We will do our best so that in the next version of the menu all this (setting the expand mode and the _itemsLoaded variable) will be done automatically when you call the clear() method.
I hope this helps.
All the best,
Veskoni
the Telerik team