简体   繁体   English

如何在C#中的dataGrid中添加事件

[英]how to add event in dataGrid in C#

Consider i have a dataGrid that is created dynamically. 考虑我有一个动态创建的dataGrid。 Now i need to add an event, ie load another form when i click a specific cell in the dataGrid. 现在,我需要添加一个事件,即,当我单击dataGrid中的特定单元格时,加载另一个表单。 How can i do this in C# VS 2005.? 如何在C#VS 2005中做到这一点?

您可以使用yourobject.NameOfEvent += new NameOfEventHandler(method);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM