This question is locked. New answers and comments are not allowed.
Using Razor. I can import the model at the top of the view without a problem;
But then FilterCategory and FilterChild are cannot be found in the rest of the view code:
I get a "type or namespace name could not be found".
Not sure if I have built my Model incorrectly...the example on the demos site doesn't include and example of model code.
Any ideas on whats wrong? Any full code examples out there of binding a treeview to a DB that someone would like to share?
@model IEnumerable<NtaWebPortal.Models.FilterCategory>But then FilterCategory and FilterChild are cannot be found in the rest of the view code:
@{Html.Telerik().TreeView() .Name("TreeView") .ShowCheckBox(true) .BindTo(Model, mappings => { mappings.For<FilterCategory>(binding => binding .ItemDataBound((item, category) => { item.Text = category.ParentName; }) .Children(category => category.Children)); mappings.For<FilterChild>(binding => binding .ItemDataBound((item, child) => { item.Text = child.childName; })); } ) .Render(); }Not sure if I have built my Model incorrectly...the example on the demos site doesn't include and example of model code.
Any ideas on whats wrong? Any full code examples out there of binding a treeview to a DB that someone would like to share?