一个问题,希望帮忙(winform)? 你把操作代码贴过来,大家帮你看看! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 this.dataGrid1.CurrentCellChanged+=new System.EventHandler (dataGrid1_CurrentCellChanged);//假定this.DataSet1.Tables[1]就是dataGrid1绑定的数据源private void dataGrid1_CurrentCellChanged(object sender,System.EventArgs e) { BindingManagerBase bm = this.dataGrid1.BindingContext[this.dataGrid1.DataSource, this.dataGrid1.DataMember]; DataRow currentRow=((DataRowView)bm.Current).Row; Console.WriteLine(currentRow[1].ToString()); Console.WriteLine(this.DataSet1.Tables[1].Rows.Count.ToString()); }//可以从两个输出发现问题:行已经存在,但没添加到Datatable上 (注意一定要在新行) 子线程异常处理 关于webservice 两个问题 求助:如何使用.net写一个ActiveX,要求它可以嵌入word2010文档中而且保存后可以在此正常打开 高手请进,datagridview的问题 问个面向对象设计的问题,高手请进!! 新手弱问:在xml中,这样的语句是一样的么? c#我不知道在什么地方开始写代码 请问C#开发出来的程序一般能在什么环境下运行?98可以吗? winform把线程写在构造函数和Form1_load中有什么区别? C#获取Excel有数据的列的列标 关于window service的问题。 请问在C#中如何保证一个执行文件只有一个实例?
private void dataGrid1_CurrentCellChanged(object sender,System.EventArgs e)
{
BindingManagerBase bm = this.dataGrid1.BindingContext[this.dataGrid1.DataSource, this.dataGrid1.DataMember];
DataRow currentRow=((DataRowView)bm.Current).Row;
Console.WriteLine(currentRow[1].ToString());
Console.WriteLine(this.DataSet1.Tables[1].Rows.Count.ToString());
}
//可以从两个输出发现问题:行已经存在,但没添加到Datatable上 (注意一定要在新行)