I have this table:
Id | Name | Parent
------------------------
1 | name1 | null
2 | name2 | 1
3 | name3 | 1
4 | name4 | 2
So the result would be:
| name1 |
---------------------
| name2 | name4 |
---------------------
| name3 |
How do I pass this tree to View using recursion and how would it be displayed?
I checked other threads similar to my question, but none had a complete answer. Thanks
MyClassas a property which defines the children for each one. E.g:public ICollection<MyClass> MyClassChildren { get; set; }. Once done you'll have to create theTreeViewrecursively. This may help: hamidmosalla.com/2018/05/17/…