[求助]谁有datagrid控件删除行索引行的代码?(已解决)
											例如:datagrid控件把数据读取出来以后,我定义了一个修改和删除按钮,当点击修改和删除按钮后可以修改或者删除datagrid控件选中的那一行,请大侠赐教!~
[此贴子已经被作者于2006-8-31 9:21:59编辑过]
[此贴子已经被作者于2006-8-31 9:21:59编辑过]
 2006-08-31 08:48
	    2006-08-31 08:48
   2006-08-31 08:57
	    2006-08-31 08:57
   2006-08-31 09:09
	    2006-08-31 09:09
   2006-08-31 09:11
	    2006-08-31 09:11
  2005中:
string UserCoding = ds.Tables[0].Rows[dataGridView1.CurrentRow.Index]["ID"].ToString();    //取出选定行的"ID"(ID为主键)字段
2003中:
dataGrid1.CurrentCell = new DataGridCell(dataGrid1.CurrentRowIndex,0);  //使当前dataGrid的单元格为选择行的第一列(ID)
string UserCoding = dataGrid1[this.dataGrid1.CurrentCell].ToString(); 
UserCoding就是你需要的.

 2006-08-31 09:13
	    2006-08-31 09:13
   2006-08-31 09:20
	    2006-08-31 09:20