I have a formview that uses an objectdatasourc e to insert and update
records. I don't want to use the objectdatasourc e'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(obj ect sender,
FormViewCommand EventArgs 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 ObjectDataSourc e 'ObjectDataSour ceModule'
unless the DeleteMethod is specified
How do I force it to use my Delete Method instead of the
ObjectDataSourc e's Delete Method.
Thank you for any help
John
records. I don't want to use the objectdatasourc e'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(obj ect sender,
FormViewCommand EventArgs 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 ObjectDataSourc e 'ObjectDataSour ceModule'
unless the DeleteMethod is specified
How do I force it to use my Delete Method instead of the
ObjectDataSourc e's Delete Method.
Thank you for any help
John