如何在asp.net C中从焦点事件中的Gridview文本框中获取行索引#
我通过使用templatefield在Gridview中使用Textbox。一切都很顺利。但我的问题是,每当文本框获得焦点时,我都需要该gridview的行索引。如何在asp.net C中从焦点事件中的Gridview文本框中获取行索引#,asp.net,c#-4.0,Asp.net,C# 4.0,我通过使用templatefield在Gridview中使用Textbox。一切都很顺利。但我的问题是,每当文本框获得焦点时,我都需要该gridview的行索引。 你能帮助我吗? 提前谢谢也许这个 private void getCurrentCellButton_Click(object sender, System.EventArgs e) { string msg = String.Format("Row: {0}, Column: {1}", dataGridView1.Cu
你能帮助我吗? 提前谢谢也许这个
private void getCurrentCellButton_Click(object sender, System.EventArgs e)
{
string msg = String.Format("Row: {0}, Column: {1}",
dataGridView1.CurrentCell.RowIndex,
dataGridView1.CurrentCell.ColumnIndex);
MessageBox.Show(msg, "Current Cell");
}