Hi,
Can anyone let me know how to handle n-level hierarchy in a tree view?
This is my hierarchy
public class Test
{
public int Id {get; set;}
public string Name {get; set;}
public IList<Test> Children {get; set;}
}
result could be
{
Test
{
- Id : 1
- Name : One
- Children : {
Test
- Id : 2
- Name : Two
- Children : {}
}
},
Test
{
- Id : 3
- Name : Three
- Children : {
Test
- Id : 4
- Name : Four
- Children : {
Test
- Id : 5
- Name : Five
- Children : {}
}
}
}
}
I dont know how many levels will be returned exactly. Is this possible to handle?
Cheers,
Ganesh
Can anyone let me know how to handle n-level hierarchy in a tree view?
This is my hierarchy
public class Test
{
public int Id {get; set;}
public string Name {get; set;}
public IList<Test> Children {get; set;}
}
result could be
{
Test
{
- Id : 1
- Name : One
- Children : {
Test
- Id : 2
- Name : Two
- Children : {}
}
},
Test
{
- Id : 3
- Name : Three
- Children : {
Test
- Id : 4
- Name : Four
- Children : {
Test
- Id : 5
- Name : Five
- Children : {}
}
}
}
}
I dont know how many levels will be returned exactly. Is this possible to handle?
Cheers,
Ganesh