|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
GridView OnRowCreated won't compileI'm having a strange issue with getting my GridView - OnRowCreated method to compile. I've got a simple GridView with the following: <asp:GridView ID="GridView1" runat="server" OnRowCreated="GridView1_RowCreated" OnRowCommand="GridView1_RowCommand"> And in my code behind I have the following: protected void GridView1_RowCreated(object sender, GridViewCommandEventArgs e) { string s = "hello"; } The error I receive during compile is: No overload for 'GridView1_RowCreated' matches deleted 'System.Web.UI.WebControls.GridViewRowEventHandler' I have a similar setup for the OnRowCommand method with no compile issues. Any ideas? One minor correction to the error text above. The error is:
No overload for 'GridView1_RowCreated' matches DELEGATE 'System.Web.UI.WebControls.GridViewRowEventHandler' RowCreated doesn't have a signature (hence the overload error) with GridViewCommandEventArgs
in it, it's GridViewRowEventArgs. HTH. -dl Show quote > Hi all, > I'm having a strange issue with getting my GridView - OnRowCreated > method to compile. I've got a simple GridView with the following: > <asp:GridView ID="GridView1" runat="server" > OnRowCreated="GridView1_RowCreated" > OnRowCommand="GridView1_RowCommand"> > And in my code behind I have the following: > > protected void GridView1_RowCreated(object sender, > GridViewCommandEventArgs e) > { > string s = "hello"; > } > The error I receive during compile is: > > No overload for 'GridView1_RowCreated' matches deleted > 'System.Web.UI.WebControls.GridViewRowEventHandler' > > I have a similar setup for the OnRowCommand method with no compile > issues. > > Any ideas? > |
|||||||||||||||||||||||