problem with TreeListNode
I'm trying to create a treelistnode. The following below code getting an error:
private TreeListNode CreateTreeNode(EntityInfo entity)
{
CategoryInfo info = entity as CategoryInfo;
TreeListNode treeNode = new TreeListNode();
treeNode.SetValue("CatName", info.CatName);
treeNode.SetValue("CateCode", info.CateCode);
treeNode.SetValue("Id", info.Id);
treeNode.Tag = info.Id;
return treeNode;
}
Error
DevExpress.X开发者_运维知识库traTreeList.Nodes.TreeListNode.TreeListNode(int, DevExpress.XtraTreeList.Nodes.TreeListNodes)' is inaccessible due to its protection level
I need your help to create a separate treelistnode Thanks!
You should use the TreeList's AppendNode method instead. Please also refer to the How to: Create Nodes in Unbound Mode in Code topic.
精彩评论