I have created an account table in my database, with these columns:
ID
Name
ParentID
This is an example of how records have been stored:
ID Name ParentID
1 BANK A 0
2 0001 1
3 0002 1
4 BANK B 0
5 0001 4
6 0002 4
But the company name does not come from database, it comes from code. So how can I expand the TreeView
like this?
├─ BANK A
│ ├─ 0001
│ └─ 0002
└─ BANK B
├─ 0001
└─ 0002
How can I do this in C#? I also tried from HERE but I still don't understand it.
See Question&Answers more detail:os