J
jphaycock
I have a formview that uses an objectdatasource to insert and update
records. I don't want to use the objectdatasource's "Delete" method so
I have defined this method as "none" in the "configure datasource"
wizard.
I assumed I could use my own Delete Method by using the ItemCommand:
protected void FormViewModule_ItemCommand(object sender,
FormViewCommandEventArgs e)
{
if (e.CommandName == "Delete")
{
lblMessage.Text = "Deleted";
}
}
I just tried to set the text on a label to see if the event would fire
but I get this error message:
Deleting is not supported by ObjectDataSource 'ObjectDataSourceModule'
unless the DeleteMethod is specified
How do I force it to use my Delete Method instead of the
ObjectDataSource's Delete Method.
Thank you for any help
John
records. I don't want to use the objectdatasource's "Delete" method so
I have defined this method as "none" in the "configure datasource"
wizard.
I assumed I could use my own Delete Method by using the ItemCommand:
protected void FormViewModule_ItemCommand(object sender,
FormViewCommandEventArgs e)
{
if (e.CommandName == "Delete")
{
lblMessage.Text = "Deleted";
}
}
I just tried to set the text on a label to see if the event would fire
but I get this error message:
Deleting is not supported by ObjectDataSource 'ObjectDataSourceModule'
unless the DeleteMethod is specified
How do I force it to use my Delete Method instead of the
ObjectDataSource's Delete Method.
Thank you for any help
John