In the Gridview, I have also put the event for 'Deleting'
<asp:GridView ID="gv1" runat="server"
AutoGenerateColumns="false"
Onrowupdating="gv_edit"
Onrowdeleting="gv_del"
...
But when executing it, I've got
Server Error in '/' Application.
________________________________________
Compilation Error
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'
Source Error:
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
Thanks. But I got this after I’ve clicked ‘Delete’ to delete the record. What's the problem with the event above?
Server Error in '/' Application.
Deleting is not supported by data source 'ds_job_det' unless DeleteCommand is specified.
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.
Source Error:
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.
wmec
Contributor
6534 Points
3322 Posts
Compiler Error Message: CS0123: No overload for 'gv_del' matches delegate ...
Aug 17, 2009 03:58 AM|LINK
Hi,
In the Gridview, I have also put the event for 'Deleting'
<asp:GridView ID="gv1" runat="server"
AutoGenerateColumns="false"
Onrowupdating="gv_edit"
Onrowdeleting="gv_del"
...
In the code behind, I have this event
protected void gv_del(object sender, GridViewRowEventArgs e)
{
gv1.EditIndex = -1;
gv1.DataBind();
}
But when executing it, I've got
Server Error in '/' Application.
________________________________________
Compilation Error
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'
Source Error:
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
...
HuaMin Chen
qwe123kids
All-Star
48619 Points
7957 Posts
MVP
Re: Compiler Error Message: CS0123: No overload for 'gv_del' matches delegate ...
Aug 17, 2009 04:21 AM|LINK
Hi,
have U Created Eventfor "gv_del" in your code behind.
if donot donot use "gv_del" .
Avinash Tiwari
Remember to click “Mark as Answer” on the post, if it helps you.
wmec
Contributor
6534 Points
3322 Posts
Re: Compiler Error Message: CS0123: No overload for 'gv_del' matches delegate ...
Aug 17, 2009 04:44 AM|LINK
Yes, I created that (you can see my codes above)
HuaMin Chen
qwe123kids
All-Star
48619 Points
7957 Posts
MVP
Re: Compiler Error Message: CS0123: No overload for 'gv_del' matches delegate ...
Aug 17, 2009 04:57 AM|LINK
Avinash Tiwari
Remember to click “Mark as Answer” on the post, if it helps you.
wmec
Contributor
6534 Points
3322 Posts
Re: Compiler Error Message: CS0123: No overload for 'gv_del' matches delegate ...
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?
Server Error in '/' Application.
Deleting is not supported by data source 'ds_job_det' unless DeleteCommand is specified.
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.
Source Error:
HuaMin Chen
qwe123kids
All-Star
48619 Points
7957 Posts
MVP
Re: Compiler Error Message: CS0123: No overload for 'gv_del' matches delegate ...
Aug 17, 2009 07:12 AM|LINK
http://forums.asp.net/p/1330155/2672161.aspx#2672161
chk the above link
Avinash Tiwari
Remember to click “Mark as Answer” on the post, if it helps you.
wmec
Contributor
6534 Points
3322 Posts
Re: Compiler Error Message: CS0123: No overload for 'gv_del' matches delegate ...
Aug 17, 2009 07:17 AM|LINK
Thanks. But my problem is from the 'Deletecommand'.
HuaMin Chen
wmec
Contributor
6534 Points
3322 Posts
Re: Compiler Error Message: CS0123: No overload for 'gv_del' matches delegate ...
Aug 17, 2009 09:23 AM|LINK
What's the problem with the event above?
HuaMin Chen