c# - 如果存在重复节点,如何查找节点
问题描述
在 Devexpress 树列表中。我有重复的数据,但它不能很好地工作......
例如
- 列表
- 我是一名学生
- 我是一名护士
- 我们是朋友
- 我们是世界
- 这些不是我的钱
我想要的节点
| A | B | C | D | E |
├───im
│ └───a
│ └───stuent
│ └───nurse
├───we
│ └───are
│ └───friends
│ └───the
│ └───world
│ └───0409
├───these
│ └───are
│ └───not
│ └───my
│ └───money
但我的节点是这样的
我的节点
| A | B | C | D | E |
├───im
│ └───a
│ └───stuent
│ └───nurse
├───we
│ └───are
│ └───friends
│ └───the
│ └───world
│ └───0409
│ └───not
│ └───my
│ └───money
├───these
有重复的单词“are”,所以在使用 FindNodeByFieldValue("B", "are") 时,每个“are”单词都附加在“we”而不是“these”下
这是我的代码
treelist.AppendNode(new object[] { null, list[i].mean},
treelist.FindNodeByFieldValue("columnA", list[i].word));
解决方案
推荐阅读
- c - 在 Visual Studio 2017 调试器中查找 NaN 出现的根
- firebase - 如何通过颤振从firebase获取下载URL?
- python - 按列索引熊猫数据框重命名列
- angular - 对 ngrx 效果的操作类型不匹配
- r - 如何在 R Markdown 的投影仪演示文稿的标题页中添加更多信息?
- java-8 - JDK 或 JRE 的 Java 核心 API 部分?
- selenium - 无效的 --log-level 值。无法初始化日志记录。Exiting... 启动 Selenium Grid 节点时出错
- android - 使用 BillingClient 进行应用内计费。响应代码 = -1。服务连接断开
- python - 如何使用 Python 获取文本中的值 [n]?
- android - 如何在我的应用程序中设置我的 DatePicker 对话框