请问怎么获取DataGrid中当前选中的行 int rowIndex = this.dataGrid对象.getCurrentRowIndex(); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 DataRow dt; mBind.Position = this.dataGrid1.CurrentRowIndex; dt = ds.Tables[0].Rows[mBind.Position]; 汗…………这不是绕了个圈子么直接用 ds.Tables[0].Rows[this.dataGrid1.CurrentRowIndex]; ds.Tables[0].Rows[this.dataGrid1.CurrentRowIndex];和DataRow dt; mBind.Position = this.dataGrid1.CurrentRowIndex; dt = ds.Tables[0].Rows[mBind.Position];效果 是一样,但是在实际中,使用第二种(符合规范吧) DataRow dt;dt = ds.Tables[0].Rows[mBind.Position];=============这样子就可以了啊....datagridview.datasource=mbind; 酒店管理软件房太图开发思路 求救两个图片叠在一起的问题 C# 将datagridview的数据插入到数据库 客户端树形控件父子结点联动问题 如何实现分别按年,年月,年月日查询呀??? 急急急! c# 最后调用出错 多标签浏览器,遇到页面有window.opener 新窗口有bug,求解决办法 选择tabPage,dataGrid中的连接内容随之改变,怎么实现? 哪位老大有.NET的CrystalReport(水晶报表)的注册码?请支援! vs2005做web为什么在页面的属性窗口中找不到事件 如何求一个判断表达式的布尔值
mBind.Position = this.dataGrid1.CurrentRowIndex;
dt = ds.Tables[0].Rows[mBind.Position];
和
DataRow dt;
mBind.Position = this.dataGrid1.CurrentRowIndex;
dt = ds.Tables[0].Rows[mBind.Position];
效果 是一样,但是在实际中,使用第二种(符合规范吧)
dt = ds.Tables[0].Rows[mBind.Position];=============这样子就可以了啊....
datagridview.datasource=mbind;