您的位置:首页 > 其它

DataGridview 获得当前单元格的行号和列号.

2013-10-12 17:55 841 查看
private void dataGridView1_CellEnter(object sender, DataGridViewCellEventArgs e)

{

iTag = (int)this.Tag;

//if (iTag == 4)

//{

// if (e.ColumnIndex ==3)

// MessageBox.Show("该列为只读列", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);

//}

//获取当前单元格的行号和列号

string rowIndex = e.RowIndex.ToString();

string colIndex = e.ColumnIndex.ToString();

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: