Reputation: 7160
How could I implement a custom delete operation in a ASP.NET Dynamic Data Project
?
I found this post but nothing helped. Here's the block of code for the delete command
:
If I implemented the GridView1_RowCommand
event I can catch it on the debugger, but where does the actual Delete
command code stored, and if I changed the commandName to newDelete
how to implement a custom delete query?
Upvotes: 3
Views: 894
Reputation: 52241
You can use RowCommand
event to gridview and write custom code for deletion
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "newDelete ")
{
e.CommandArgument // will Return current Row primary key value
..............
//Write Delete custom code here
.............
}
}
Upvotes: 1