Hiya,
I do not know if DNN is a red herring or not.
I have an IList<CategoryInfo> of items which looks like this
which I am trying to bind to a treeview using the following.
my result set looks like this
ModuleId itemId CategoryDescription parentId
----------- ----------- -------------------------------------------------- ----------
381 0 NULL
381 831 CraftyPatterns 0
381 832 ClassicPatterns 0
381 957 CreativePatterns 0
381 1631 Textures 0
381 1688 Themes 0
381 1689 Animals 1688
381 1700 DELETE TO TRASH 1688
381 1705 Events 1688
381 1738 Floral 1688
381 1748 Gardening 1688
381 1750 Holidays 1688
381 1760 Music 1688
381 1778 Shapes 1688
381 1783 Sports 1688
381 1794 Travel 1688
381 1795 Par Avion 1794
381 1784 Golf 1783
381 1787 Soccer 1783
381 1788 Soccer Kits 1787
381 1789 All Red 1788
381 1790 Blue 1788
381 1791 Green Hoops 1788
381 1792 Red 1788
381 1793 White 1788
381 1785 Golf Mad 1784
but when I run the code it returns a flat tree, I am sure I am missing something but I can not fathom it out.
TIA
Richard
I do not know if DNN is a red herring or not.
I have an IList<CategoryInfo> of items which looks like this
| public class CategoryInfo |
| { |
| public int ModuleId{get; set;} |
| public int ItemId{get; set;} |
| public int CreatedByUser{get; set;} |
| public string Content { get; set; } |
| public DateTime CreatedDate{get; set;} |
| public string CategoryDescription{ get; set;} |
| public int? ParentId { get; set; } |
| } |
which I am trying to bind to a treeview using the following.
| var objCategories = new CategoryController(); |
| RadTreeView1.DataSource = objCategories.GetCategories(ModuleId); |
| RadTreeView1.DataTextField = "CategoryDescription"; |
| RadTreeView1.DataValueField = "ItemId"; |
| RadTreeView1.DataFieldParentID = "ParentId"; |
| RadTreeView1.DataBind(); |
my result set looks like this
ModuleId itemId CategoryDescription parentId
----------- ----------- -------------------------------------------------- ----------
381 0 NULL
381 831 CraftyPatterns 0
381 832 ClassicPatterns 0
381 957 CreativePatterns 0
381 1631 Textures 0
381 1688 Themes 0
381 1689 Animals 1688
381 1700 DELETE TO TRASH 1688
381 1705 Events 1688
381 1738 Floral 1688
381 1748 Gardening 1688
381 1750 Holidays 1688
381 1760 Music 1688
381 1778 Shapes 1688
381 1783 Sports 1688
381 1794 Travel 1688
381 1795 Par Avion 1794
381 1784 Golf 1783
381 1787 Soccer 1783
381 1788 Soccer Kits 1787
381 1789 All Red 1788
381 1790 Blue 1788
381 1791 Green Hoops 1788
381 1792 Red 1788
381 1793 White 1788
381 1785 Golf Mad 1784
but when I run the code it returns a flat tree, I am sure I am missing something but I can not fathom it out.
TIA
Richard