【发布时间】:2014-09-09 12:59:58
【问题描述】:
我正在尝试在 TreeListLookupEdit 中选择一个节点。
var fn = treeListLookupEdit1.FindNodeByKeyID(NodeId);
treeListLookupEdit1.Properties.TreeList.FocusedNode = fn;
我的 TreeListLookupEdit 已经填充了数据(来自 EF 数据源),我需要关注所需的行并在 treeListLookUpEdit1.Text(处于关闭状态时)和打开弹出窗口时查看此值也是。
但是什么也没发生,它没有选择节点。
我也试过这个(其中“treeNodes”是 TreeListLookupEdit 中的实际 TreeList):
treeNodes.FocusedNode = fn;
但是,当我运行这段代码时,它可以工作:
treeListLookupEdit1.ShowPopup();
treeListLookupEdit1.Properties.TreeList.FocusedNode = fn;
treeListLookupEdit1.ClosePopup();
那么,如何避免使用 ShowPopup?
更新 看来,你应该设置 EditValue
treeListLookupEdit1.EditValue = NodeId
【问题讨论】:
-
有像EditingValue这样的属性吗?
-
是的,TreeListLookupEdit 有一个 EditValue,但它什么也没做。
-
那么我认为没有其他方法可以在不弹出查找的情况下聚焦树节点。
标签: winforms devexpress xtratreelist