Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Override formview objectdatasource method

0 views
Skip to first unread message

jpha...@googlemail.com

unread,
Apr 29, 2008, 6:52:25 AM4/29/08
to
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

0 new messages