且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在WIndows窗体中的Datagridview的标题上禁用鼠标双击事件。

更新时间:2022-12-23 14:03:53

在双击事件中你需要检查事件的原始来源是否为Row,如果没有,那么你可以避免它......

in the Double click event u need to check whehter the Original Source of the event is Row or not if not then u can avoid it...

 if (e.OriginalSource.GetType() == typeof(DataGridRow))
      {
        //Implement ur logic      
      }


希望它帮助你

hope it helps u