Hello All,
I am thinking about the best way to display a nested table in a TreeView.
The table looks like this
Code, ParentCode, Description
Where ParentCode is the ID of the Code in the same table.
For example, the data would look like this
Code1, null, Call Signs
SMILE, Code1, Smiling
LAUGH, Code1, Laughing
LMAO, LAUGH, Laughing My Ass Off
Code2, null, Colors
Red, Code2, Red color
Blue, Code2, Blue
And I want to display this in a TreeView as follows
Code:
Code1 (Call Signs)
Smile (Smiling)
Laugh (Laughing)
LMAO (Laughing My Ass Off)
Code2 (Colors)
Red (Red Color)
Blue (Blue)
I have N-Layer application. And Im considering add a .GetChildren method to the codes Manager to get all children of a code. And then go through all top items and then in depth.
But Iam worried that this will be too length, and while I will implement such a method for flexibility later on, I want to be able to do this preferably in one shot on the DB and have the DB or BLL return it in a structure that is readily useful for the TreeView.
I appreciate all the help I can get.
