C
Chris
I have a formview within a user control bound to an objectdatasource. When
my formview is in edit mode and I press update I get an error saying that
the form must be in edit mode to do an update. I am guessing on the postback
the user control is setting the form back to ReadOnly. I got around this by
triggering the update in the formview from a button using the updateitem
method but changing the mode of the form to edit beforehand.
This works but the error that I bubble up in the event of a validation error
from my business object won't display on the page. I trap the error in the
formview item updated event and display it in a label. This label won't
display, I suspect because I am altering the formview back to edit.
What Am I doing wrong? I think there is something fundemental I am not
understanding about formviews within user controls. Regards, Chris.
my formview is in edit mode and I press update I get an error saying that
the form must be in edit mode to do an update. I am guessing on the postback
the user control is setting the form back to ReadOnly. I got around this by
triggering the update in the formview from a button using the updateitem
method but changing the mode of the form to edit beforehand.
This works but the error that I bubble up in the event of a validation error
from my business object won't display on the page. I trap the error in the
formview item updated event and display it in a label. This label won't
display, I suspect because I am altering the formview back to edit.
What Am I doing wrong? I think there is something fundemental I am not
understanding about formviews within user controls. Regards, Chris.