Visual C# - Associate event handler with CellDoubleClick event

一世执手 提交于 2019-12-06 15:52:46

The CellDoubleClick event is a DataGridViewCellEventHandler, not an EventHandler`.

You should add the event handles using the designer, which will automatically use the correct delegate type.
You should not edit the designer-generated code manually.

In general, when adding event handlers, you shouldn't explicitly create the delegate.
Instead, you can write

myGrid.CellDoubleClick += MyGrid_CellDoubleClick;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!