Jul 022012
Programming in C#: Treeview problems in WinForm C# on newest questions tagged c# – Stack Overflow
I’ve table in database ItemList that hold ProdutID with ItemID.
ProductID ItemID
AAA 1001
AAA 1002
AAA 1003
BBB 1201
BBB 1293
CCC 1040
DDD 2011
DDD 3203
I want add all those data to Treeview Like this:
+AAA
- 1001
- 1002
- 1003
+BBB
- 1201
- 1293
+CCC
- 1040
+DDD
- 2011
- 3203
please teach me how to do this. Thanks.
edit :
i try to add each item into ArrayList with length 2 data (ProductID, ItemID)
for(int i=0;i<arrayList.count;i++)
{
TreeNode treeNode = new TreeNode(((string[])arrayList[i])[0]);
treeview1.Nodes.Add(treeNode);
}
See Answers
source: http://stackoverflow.com/questions/11287178/treeview-problems-in-winform-c-sharp
Programming in C#: programming-in-c
Recent Comments