This question is locked. New answers and comments are not allowed.
Think I found a bug in Menus from version 2012.1.214.340. I get error "Object reference not set to an instance of an object" when using method prototype #2 of the 5 listed at http://www.telerik.com/help/aspnet-mvc/overload_telerik_web_mvc_ui_menubuilder_bindto.html. The prototype is public MenuBuilder BindTo(IEnumerable<MenuItem> items).
I am passing a properly formed IEnumerable<MenuItem> with 5 menu items. Platform is Windows Server 2008R2 64-bit, MVC 3, VS2010.
The failing code is in MenuBuilder.cs line 239:
(items as List<MenuItem>).ForEach(item => Component.Items.Add(item));
I believe the List<MenuItem> part is failing to convert the IEnumerable. It works perfectly if I rewrite this as
var foo = new List<MenuItem>(items);
I am passing a properly formed IEnumerable<MenuItem> with 5 menu items. Platform is Windows Server 2008R2 64-bit, MVC 3, VS2010.
The failing code is in MenuBuilder.cs line 239:
(items as List<MenuItem>).ForEach(item => Component.Items.Add(item));
I believe the List<MenuItem> part is failing to convert the IEnumerable. It works perfectly if I rewrite this as
var foo = new List<MenuItem>(items);
foo.ForEach(item => Component.Items.Add(item));