This question is locked. New answers and comments are not allowed.
Before we start, I've already read over :
http://www.telerik.com/community/forums/aspnet-mvc/treeview/treeview-children-recursion.aspx
http://www.telerik.com/community/forums/aspnet-mvc/treeview/bind-to-model-could-be-better.aspx
To no avail (if I've overlooked something specific in there that I'm missing please let me know!) I have 3 simple tables in a database and I'm having problems populating the 3rd tier (2nd child). Any tips?
In summary the Tree should be like this..
Contract Description
Member FirstName, LastName of the Contract
EpisodeID of each Member.
BTW, just one child works... For example this works...
But this does not...
http://www.telerik.com/community/forums/aspnet-mvc/treeview/treeview-children-recursion.aspx
http://www.telerik.com/community/forums/aspnet-mvc/treeview/bind-to-model-could-be-better.aspx
To no avail (if I've overlooked something specific in there that I'm missing please let me know!) I have 3 simple tables in a database and I'm having problems populating the 3rd tier (2nd child). Any tips?
In summary the Tree should be like this..
Contract Description
Member FirstName, LastName of the Contract
EpisodeID of each Member.
BTW, just one child works... For example this works...
@(Html.Telerik().TreeView() .Name("myTree") .BindTo(Model, mappings => { mappings.For<Model.Contract>(binding => binding .ItemDataBound((item, contract) => { item.Text = contract.Description; }) .Children(contract => contract.Members)); mappings.For<Model.Member>(binding => binding .ItemDataBound((item, member) => { item.Text = member.FirstName + " " + member.LastName; })); }))But this does not...
Html.Telerik().TreeView() .Name("myTree") .BindTo(Model, mappings => { mappings.For<Model.Contract>(binding => binding .ItemDataBound((item, contract) => { item.Text = contract.Description; }) .Children(contract => contract.Members)); mappings.For<Model.Member>(binding => binding .ItemDataBound((item, member) => { item.Text = member.FirstName + " " + member.LastName; }) .Children(member => member.Episodes)); mappings.For<Model.Episode>(binding => binding .ItemDataBound((item, episode) => { episode.Text = episode.episodeid; })); }))