Hi,
In my DB I have 2 tables Units and Groups
In Units I have
Id
Name
In Groups I have
Id
Name
UnitID
This is my code
BMDataClassesDataContext db = new BMDataClassesDataContext();
TreeNode rootNode = new TreeNode("BM");
var n1 = from node in db.Units select node;
foreach (var item in n1)
{
var child = new TreeNode(item.Name, item.Id.ToString());
rootNode.ChildNodes.Add(child);
}
TreeView1.Nodes.Add(rootNode);
Now how can I add the table Group so it appears as a child node for the Unit Table?
Thnx beforehand,
batool