解决方案 »
- 使用vs2010旗舰版,dataGridView1绑定数据的问题?付源码
- 用VS测试的时候,出现“ORA-01005: 给出空口令; 登录被拒绝”怎么办呀
- VS2008中LINQ有多少的BUG?
- 请教怎么使用AxWebBrowser中的ExecWB方法!!!
- ADO.NET
- 在VS2010里打包有数据库的C#程序,然后提示无法找到文件“*”的源文件,说我的“.mdf”和“.ldf”文件可能不存在或已被锁定,怎么办啊~
- C#中最高等的操作。。。?
- 图象
- C#前景暗淡呀!散分!
- 誰能告訴我在C#中如何使用sqldmo?
- 已知数据,用C#画出一条曲线
- Update 无法找到 TableMapping['test'] 或 DataTable“test”
FuncTreeDialogForm f = (FuncTreeDialogForm)App.Resolve<IFuncTreeDialogForm>();
DialogResult dr = f.ShowDialog();
if (dr != DialogResult.Cancel)
{
this.funcButtonEdit.Text = f.SelectedFunc.Func_Full_Name;
this.funcButtonEdit.EditValue = f.SelectedFunc.Func_Full_Name;
this.Bug.Func_Id = f.SelectedFunc.Func_Id;
}
f.Close();
这样的话,我选择一个功能后,ButtonEdit显示对应的名字,加载的时候也是对应的名字,可是如果我点击其他空白处,ButtonEdit就会变成对应的Id了,改问题如何解决??
我绑定数据代码:
this.funcButtonEdit.DataBindings.Add(new Binding("EditValue", this.Bug, "Func_Id"));
this.funcButtonEdit.Text = this.Presenter.FuncService.LoadFunc(this.Bug.Func_Id).Func_Full_Name;
this.funcButtonEdit.EditValue = this.funcButtonEdit.Text;
还有一点EditValue和Text有必要都设置吗??
在A中 显示B 时候 判断是否按有选择
DialogResult rs = f.ShowDialog(this);
if (rs == DialogResult.OK)
{
string stringName =f.trFocusedNode.GetValue("Func_Full_Name");
}
这个我也解决了,this.funcButtonEdit.DataBindings.Add(new Binding("EditValue", this.Bug, "Func_Id"));这样绑定确实有点问题,我直接写结果,在后面的事件中会为Bug.Func_Id重新赋值,保存时直接取就是最新值了
例外最后一点,treeList里面展开到指定节点是哪个?怎么只有一个ExpandAll()方法,是展开所有节点啊