如何在InitializeComponent()中调用方法 [英] How to call a method in InitializeComponent()
本文介绍了如何在InitializeComponent()中调用方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在InitializeComponent()中以编程方式调用gridview事件。
这个。 GridView1.RowDataBound + = new System.EventHandler(this.GridView1_RowDataBound);
错误是'DataGrid1_RowDataBound'没有重载匹配委托'System.EventHandler'
谢谢,
Priya
Hi,
I am calling gridview events in programatically in InitializeComponent()
this.GridView1.RowDataBound += new System.EventHandler(this.GridView1_RowDataBound);
error is No overload for 'DataGrid1_RowDataBound' matches delegate 'System.EventHandler'
Thanks,
Priya
推荐答案
您可以尝试添加GridViewRowEventHandler
You can try by adding GridViewRowEventHandler
this.GRD.RowDataBound += new GridViewRowEventHandler(this.GRD_RowDataBound);
void GRD_RowDataBound(object sender, GridViewRowEventArgs e)
{
throw new NotImplementedException();
}
这篇关于如何在InitializeComponent()中调用方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文