Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 17, 2009 09:23 AM by wmec
Aug 17, 2009 03:58 AM|LINK
In the Gridview, I have also put the event for 'Deleting'
<asp:GridView ID="gv1" runat="server"
In the code behind, I have this event
protected void gv_del(object sender, GridViewRowEventArgs e)
gv1.EditIndex = -1;
But when executing it, I've got
Server Error in '/' Application.
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0123: No overload for 'gv_del' matches delegate 'System.Web.UI.WebControls.GridViewDeleteEventHandler'
Line 91: runat="server" />
Line 92: <br /><br />
Line 93: <asp:GridView ID="gv1" runat="server"
Line 94: AutoGenerateColumns="false"
Line 95: Onrowupdating="gv_edit"
Source File: c:\dev_proj\Visual Studio 2008\Projects\NewSite\NewSite\my_cv.aspx Line: 93
Aug 17, 2009 04:21 AM|LINK
have U Created Eventfor "gv_del" in your code behind.
if donot donot use "gv_del" .
Aug 17, 2009 04:44 AM|LINK
Yes, I created that (you can see my codes above)
Aug 17, 2009 04:57 AM|LINK
Try Changing "GridViewRowEventArgs e" To "GridViewDeleteEventArgs e" Chk Your function
Aug 17, 2009 06:25 AM|LINK
Thanks. But I got this after I’ve clicked ‘Delete’ to delete the record. What's the problem with the event above?
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NotSupportedException: Deleting is not supported by data source 'ds_job_det' unless DeleteCommand is specified.
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Aug 17, 2009 07:12 AM|LINK
chk the above link
Aug 17, 2009 07:17 AM|LINK
Thanks. But my problem is from the 'Deletecommand'.
Aug 17, 2009 09:23 AM|LINK
What's the problem with the event above?