首先创建一个用户控件,从DataGrid继承,然后override它的onmousedown方法:
如何让DataGrid选中一行,而不是单元格OnMouseDown(System.Windows.Forms.MouseEventArgs e)  
如何让DataGrid选中一行,而不是单元格  
 
然后在你的窗体上添加这个控件,绑定数据后就可以了。

相关文章:

  • 2022-12-23
  • 2021-06-15
  • 2021-09-29
  • 2021-05-21
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-07
  • 2022-03-08
  • 2022-12-23
  • 2021-11-30
  • 2022-02-23
  • 2022-01-16
相关资源
相似解决方案