日期:2014-05-19  浏览次数:20873 次

文本綁定,進來送分
vb.net語法
  dim   HRCurrentManage   As   CurrencyManager
  me.HRCurrentManage   =   CType(me.BindingContext(me.dtload),   CurrencyManager)

此語句怎么轉換成c#?


private     System.Windows.Forms.CurrencyManager   HRCurrentManage;
....



------解决方案--------------------
this.HRCurrentMange = (CurrencyManager)this.BindingContext(this.dtload);
------解决方案--------------------
学习ing..
------解决方案--------------------


this.textBox1.DataBindings.Add( "Text ", 数据源, "列名 " );
------解决方案--------------------
送分就要
------解决方案--------------------
拖入BindingNagavitor控件,在load事件里加入

this.bindingSource1.DataSource=ds.Tables[ "XXX "];
this.bindingNavigator1.BindingSource = this.bindingSource1;
this.dataGridView1.DataSource = this.bindingSource1;