开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜