我想在TreeListLookupEdit中選擇一個節點。TreeListLookupEdit - 焦點節點
var fn = treeListLookupEdit1.FindNodeByKeyID(NodeId);
treeListLookupEdit1.Properties.TreeList.FocusedNode = fn;
我TreeListLookupEdit已經充滿了數據(從EF數據源),我需要關注該行並在這兩個treeListLookUpEdit1.Text看到這個值(當它處於關閉狀態),當我也打開一個彈出窗口。
但沒有任何反應,它不會選擇節點。
我也試過這個(其中 「樹節點」 是TreeListLookupEdit內的實際的TreeList):
treeNodes.FocusedNode = fn;
但是,當我運行這段代碼,它的工作原理:
treeListLookupEdit1.ShowPopup();
treeListLookupEdit1.Properties.TreeList.FocusedNode = fn;
treeListLookupEdit1.ClosePopup();
那麼,如何避免使用ShowPopup?
更新 看來,你應該設置的EditValue
treeListLookupEdit1.EditValue = NodeId
是否有任何屬性EditingValue? – Shell
是的,TreeListLookupEdit有一個EditValue,但它什麼都不做。 – Dimitri
然後我不認爲有沒有其他方法可以在不彈出查找的情況下集中樹節點。 – Shell