如何使用右键选择DataGridView的行

xiongying18 2008-11-04 09:11:30
如何使用右键选择DataGridView的行
...全文
96 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
lengyue110 2008-11-04
  • 打赏
  • 举报
回复
private void dataGridView1_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
this.dataGridView1.CurrentCell = this.dataGridView1[0, e.RowIndex];


}
}

lengyue110 2008-11-04
  • 打赏
  • 举报
回复
试试有没有onrightclick 这个事件

16,718

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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