I’m having a strange issue with getting my GridView – RowDataBound
method to compile. I’ve got a simple GridView with the following:
<asp:GridView ID="gv_View_Documents" runat="server" AllowSorting="true"
DataKeyNames="DocumentName,Description" AutoGenerateColumns="false"
OnSorting="gv_View_Documents_Sorting" OnRowCancelingEdit="gv_View_Documents_RowCancelingEdit"
OnRowDataBound="gv_View_Documents_RowDataBound" OnRowEditing="gv_View_Documents_RowEditing"
OnRowUpdating="gv_View_Documents_RowUpdating">
When I compile, it shows an error shown below.
Compiler Error Message: CS0123: No
overload for
‘gv_View_Documents_RowDataBound’
matches delegate
‘System.Web.UI.WebControls.GridViewRowEventHandler’
I have a similar setup for another grid view with no compile
issues.
Any ideas? I’m working with C# and ASP.NET
Most probably your event handler method signature does not match with GridViewRowEventHandler signature i.e.
Most probably, you may have used EventArgs as a parameter in your event handler.