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();
}
{
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();
}
相关文章推荐
- winform datagridview 获取当前单元格的行号,或者 是列号
- ① DataGridView 取得或者修改当前单元格的内容:
- 模拟LineNumberReader的特有功能 -- 获得当前行号
- DataGridView 当前单元格的行
- ExtJs中获得(GridPanel)选中的当前选中行号
- C#:获取DataGridView控件中的当前单元格
- ExtJs中获得(GridPanel)选中的当前选中行号
- 设置DataGridView 的当前单元格
- DataGridView 获取当前单元格
- datagridview 取消对当前选定的单元格的选择
- datagridview编辑列的颜色,设置点击datagridview当前单元格事件
- dataGridView获取当前行ID值和设置单元格内字体颜色
- winform datagridview 设置当前活动的单元格
- Winfrom设置DataGridView单元格获得焦点(DataGridView - CurrentCell)
- DataGridView中保存当前正在编辑的单元格信息
- dataGridView获取当前行的第一个单元格的值的方法
- DataGridView 取得或者修改当前单元格的内容
- JSP/JS获取表格当前行行号及行每一个单元格数据
- DataGridView取得或者修改当前单元格的内容:
- C#中RichTextBox获得当前行号的方法