gpt4 book ai didi

DevExpress如何在运行时设置和获取树节点文本和名称?

转载 作者:行者123 更新时间:2023-12-01 04:38:47 25 4
gpt4 key购买 nike

我是 dev express 技术的新手。我在使用 devexpress XtraTreeList 时遇到问题,因为我无法获取节点“NAME”和“TEXT”属性。请任何人通过代码帮助我。

最佳答案

您需要记住的一件事是每个节点都可以由多个值组成。基于显示的列数。因此,您实际想要访问的是节点的特定列,以便访问或设置节点中该列的值。

例如:

TreeListColumn columnID1 = treeList1.Columns["Budget"];
// Get a cell's value in the first root node.
object cellValue1 = treeList1.Nodes[0][columnID1];

string columnID2 = "Budget";
// Get the display text of the focused node's cell
string cellText = treeList1.FocusedNode.GetDisplayText(columnID2);

查看 devExpress documentation也。这很有帮助。

关于DevExpress如何在运行时设置和获取树节点文本和名称?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11100315/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com