0
我正在Gridview中使用TextBox使用templatefield。所有工作都很好。但我的问题是,每当文本框获得焦点时,我需要该gridview的rowindex。
你能帮我吗? 在此先感谢如何从asp.net中的焦点事件的Gridview文本框中获取rowindex C#
我正在Gridview中使用TextBox使用templatefield。所有工作都很好。但我的问题是,每当文本框获得焦点时,我需要该gridview的rowindex。
你能帮我吗? 在此先感谢如何从asp.net中的焦点事件的Gridview文本框中获取rowindex C#
也许这DataGridViewCell.RowIndex Property
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");
}