I'm trying to set up a 'lazy spool', background-cache type system in a very large menu which loads its items from a webservice.
when a menu item opens (and populates its items from a webservice), I'd like to catch the Populated event for that item, and iterate the loaded items and force a populate on them in the background.
I thought calling get_items() would initiate the webservice call - but it doesn't seem to. Open is the only thing which seems to start the webservice request.
Is this technically possible?
when a menu item opens (and populates its items from a webservice), I'd like to catch the Populated event for that item, and iterate the loaded items and force a populate on them in the background.
I thought calling get_items() would initiate the webservice call - but it doesn't seem to. Open is the only thing which seems to start the webservice request.
Is this technically possible?
function TelerikMenu_OnClientItemPopulated(sender, eventArgs) {
var items = eventArgs.get_item().get_items();
for (var i = 0; i < items.get_count(); i++) {
var item = items.getItem(i);
if (item != null) {
item.get_items();
}
}
}