TreeListNode 的问题
我正在尝试创建一个树列表节点。以下代码出现错误:
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;
}
错误
DevExpress.XtraTreeList.Nodes.TreeListNode.TreeListNode(int, DevExpress.XtraTreeList.Nodes.TreeListNodes)' is inaccessible due to its protection level
我需要您的帮助来创建单独的树列表节点 谢谢!
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.XtraTreeList.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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该使用 TreeList 的 AppendNode 方法。另请参阅如何:在代码中以非绑定模式创建节点主题。
You should use the TreeList's AppendNode method instead. Please also refer to the How to: Create Nodes in Unbound Mode in Code topic.