求教Winform中dataGridView对access的修改问题 1. 你可以直接从datagrid当前行获取信息。2. 获取当前行可以唯一标准当前记录的字段,根据该字段从Datagrid.Datasource里面获取你要的信息。3. 如果第2点还是不能满足,直接从数据库查找。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 //获取dataGridView当前行的值 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { int x = e.RowIndex; //不取最后空白行的值 if (x != dataGridView1.Rows.Count -1) { this.txt_ID.Text = dt.Rows[x][0].ToString(); this.txt_Name.Text = dt.Rows[x][1].ToString(); this.txt_Address.Text = dt.Rows[x][2].ToString(); this.txt_Tel.Text = dt.Rows[x][3].ToString(); } }这个是在本页面的赋值如果是传到下个修改窗口,那就定义几个公共变量,用于传值 相同事件的调用 plsqldev715怎么运行所写的语句 关于位图之间的比较,如何详细判断位图的不同? 用实体类遇到的郁闷问题 两个WinForm类的调用函数问题 请思归,速马大侠出手相救呀。。。。。。。。。。 能用response.write添加服务器控件吗 修改webservice! 条形码字体code 128字库下载! 文本文件导入数据库出错,请教大家,谢谢... ftp文件下载 C#如何创建未知类型类的数组?
//获取dataGridView当前行的值
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
int x = e.RowIndex;
//不取最后空白行的值
if (x != dataGridView1.Rows.Count -1)
{
this.txt_ID.Text = dt.Rows[x][0].ToString();
this.txt_Name.Text = dt.Rows[x][1].ToString();
this.txt_Address.Text = dt.Rows[x][2].ToString();
this.txt_Tel.Text = dt.Rows[x][3].ToString();
} }这个是在本页面的赋值如果是传到下个修改窗口,那就定义几个公共变量,用于传值