I build a menu using a data source to supply the items. The data source is just an array of objects that have text, url, and items properties (for sub menus)
Subsequently, i want to select some menu item and apply some API function to it, like say enable.
To do so, I need to first find the particular menu item of interest. It would be nice if the menu item had an ID property. Its easy enough to add that property to my data source, but it doesn't carry through when the menu is rendered.
And, it is pretty easy to see the change that i would like to make to the menu's item template. Just add something like this:
#= item.id ? 'id=\"'+item.id+'\"' : '' #
to the item member of the templates object in kendo.menu.js
Problem is, the templates object is a function scoped "private" variable and I can't really see any good way to override or augment Menu to achieve this.
Any suggestions?
Thanks
roger
Subsequently, i want to select some menu item and apply some API function to it, like say enable.
To do so, I need to first find the particular menu item of interest. It would be nice if the menu item had an ID property. Its easy enough to add that property to my data source, but it doesn't carry through when the menu is rendered.
And, it is pretty easy to see the change that i would like to make to the menu's item template. Just add something like this:
#= item.id ? 'id=\"'+item.id+'\"' : '' #
to the item member of the templates object in kendo.menu.js
Problem is, the templates object is a function scoped "private" variable and I can't really see any good way to override or augment Menu to achieve this.
Any suggestions?
Thanks
roger