DataGridViewColumnComboBox问题

istimetoduel 2014-10-24 04:36:50
我为了捕捉DataGridView中Combox列的SelectIndex事件,
使用了如下代码的方法

private void dgvZongfenzu_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
if (e.Control is DataGridViewComboBoxEditingControl)
{
(e.Control as DataGridViewComboBoxEditingControl).SelectedIndexChanged += new EventHandler(Bl.cbb_TextChange);
}
}

我想知道:
如何在我添加Bl.cbb_TextChange这个事件中如何获得这个单元格的行列坐标

谢谢各位!拜托了
...全文
57 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
exception92 2014-10-24
  • 打赏
  • 举报
回复

 dataGridView1.SelectedCells[0].RowIndex;
 dataGridView1.SelectedCells[0].ColumnIndex;
於黾 2014-10-24
  • 打赏
  • 举报
回复
获取它的sender,就是触发这个事件的控件

110,533

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧