开发者

problem with TreeListNode

开发者 https://www.devze.com 2023-01-23 21:03 出处:网络
I\'m trying to create a treelistnode. The following below code getting an error: private TreeListNode CreateTreeNode(EntityInfo entity)

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消