本帖最后由 fdkhb 于 2021-2-20 10:53 编辑
[C#] 纯文本查看 复制代码 RepositoryItemTreeListLookUpEdit resryItemTLLpEdit = new RepositoryItemTreeListLookUpEdit();
TreeListColumn tlCol1 = resryItemTLLpEdit.TreeList.Columns.AddField("Id");
tlCol1.Caption = "ID";
tlCol1.Visible = true;
TreeListColumn tlCol = resryItemTLLpEdit.TreeList.Columns.AddField("AppChsName");
tlCol.Caption = "AppChsName";
tlCol.Visible = true;
TreeListNode tlNode1 = resryItemTLLpEdit.TreeList.Nodes.Add(new object[] { 123, "234" });
tlNode1.Nodes.Add(new object[] { 567, "789" });
resryItemTLLpEdit.TreeList.Nodes.Add(new object[] { 345, "345" });
resryItemTLLpEdit.DisplayMember = "AppChsName";
resryItemTLLpEdit.ValueMember = "AppChsName";
treeList1.RepositoryItems.Add(resryItemTLLpEdit);
treeList1.Columns["treeListColumn3"].ColumnEdit = resryItemTLLpEdit;
在TreeList.Nodes下Add三个Node,检查TreeList.VisibleNodesCount的数量也为3,为何运行后RepositoryItemTreeListLookUpEdit弹出时选项内容为空?
|