if (dataGrid1.CurrentRowIndex>=0||dataGrid1.DataSource!=null||dataGrid1[dataGrid1.CurrentCell]!=null)
{
this.textName.Text=ds.Tables[dataName].Rows[dataGrid1.CurrentCell.RowNumber][0].ToString().Trim();
}
{
this.textName.Text=ds.Tables[dataName].Rows[dataGrid1.CurrentCell.RowNumber][0].ToString().Trim();
}
这写代码 是vs2003下面的 哈哈