注意ID和ParentID两列是链表结构,不然无法产生树结构!
treeListMain.KeyFieldName = " ID " ;
treeListMain.ParentFieldName = " ParentID " ;
treeListMain.ImageIndexFieldName = " ImgIndex " ; // 属性SelectImageList为ImageList
![](https://images.cnblogs.com/cnblogs_com/zhahost/001.jpg)
转载于:https://www.cnblogs.com/zhahost/archive/2008/06/02/1212400.html