This question is locked. New answers and comments are not allowed.
I'm in the process of moving a project from Visual Studio 2008 to 2010. My TreeView with children worked fine there but I can't get it to work in 2010. I even added the code from the online "bind to model" demo, but I have the same issue. The problem seems to start as soon as I try to add the ".Children" code.
One detail I notice when hovering over the "mappings" variable.
Without children, I see: "(parameter) NavigationBindingFactory<TreeViewItem> mappings"
As soon as I add the .Children part: "(parameter) TreeViewItem mappings"
Any idea what could be causing this? What am I missing?
Thanks,
Ken
| <%= Html.Telerik().TreeView() |
| .Name("TreeView") |
| .BindTo(Model, mappings => |
| { |
| mappings.For<TelerikMvc.Models.Category>(binding => binding |
| .ItemDataBound((item, category) => |
| { |
| item.Text = category.CategoryName; |
| }) |
| ); |
| // Above works fine |
| //.Children(category => category.Products)); |
| //mappings.For<TelerikMvc.Models.Product>(binding => binding |
| // .ItemDataBound((item, product) => |
| // { |
| // item.Text = product.ProductName; |
| // })); |
| }) |
| %> |
One detail I notice when hovering over the "mappings" variable.
Without children, I see: "(parameter) NavigationBindingFactory<TreeViewItem> mappings"
As soon as I add the .Children part: "(parameter) TreeViewItem mappings"
Any idea what could be causing this? What am I missing?
Thanks,
Ken