我在页面A上一个ButtonEdit控件,存放数据所属功能;页面B上一个TreeList控件,下拉多有功能的树形结构;单击ButtonEdit弹出TreeList,当我选择好对应的节点后,我和把该节点的Id跟Name传到A页面中?
如图
A窗口上的单击事件:
private void funcButtonEdit_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
{
FuncTreeDialogForm f = (FuncTreeDialogForm)App.Resolve<IFuncTreeDialogForm>();
try
{
f.ShowDialog();
}
finally
{
f.Dispose();
}
}
B窗口选择节点:
private void FuncTreeDialogForm_Load(object sender, EventArgs e)
{
this.Presenter.View = this;
IList<Model.Func> list = this.Presenter.GetFuncList();
this.treeList1.DataSource = this.Presenter.ToDataTable(list);
treeList1.OptionsBehavior.PopulateServiceColumns = false;
treeList1.KeyFieldName = "Func_Id";
treeList1.Columns["Func_Name"].Caption = "功能名称";
treeList1.ParentFieldName = "Parent_Func_Id";
this.treeList1.ExpandAll();
}
private void treeList1_DoubleClick(object sender, EventArgs e)
{
var item = this.treeList1.FocusedNode;
var ii = item.GetValue("Func_Full_Name");
MessageBox.Show(ii.ToString());
}
我现在是选择一个节点后,能弹出相应的节点全名,我想把Id和名字传给A窗口的ButtonEdit空间显示,改如何传旨??