D
DCW
Hello all:
I have a dropdownlist bound to a datasource with a formview underneath it
set to a default mode of insert. On initial load, the formview's container
(div) is hidden and there is a link button that, when clicked, shows the
formview for the purpose of creating new a record. In the formview's insert
template, there is a linkbutton with the command name set to 'Cancel'. The
intended goal here is to cancel the formview's pending insert, hide it's
parent container and basically restore the form to its initial state.
When the cancel button is clicked, I process its 'ItemCommand' event, set
the visibility of the relevant controls and restore the form to its original
state. There is a problem. It appears that by processing the ItemCommand
and changing the visibility of the parent div, the formview's insert item
template fields don't get cleared (restored) after either a cancel or an
insert.
Obviously I can work around this with little to no trouble, but I am curious
why it happens. Anyone have any ideas?
Drew
I have a dropdownlist bound to a datasource with a formview underneath it
set to a default mode of insert. On initial load, the formview's container
(div) is hidden and there is a link button that, when clicked, shows the
formview for the purpose of creating new a record. In the formview's insert
template, there is a linkbutton with the command name set to 'Cancel'. The
intended goal here is to cancel the formview's pending insert, hide it's
parent container and basically restore the form to its initial state.
When the cancel button is clicked, I process its 'ItemCommand' event, set
the visibility of the relevant controls and restore the form to its original
state. There is a problem. It appears that by processing the ItemCommand
and changing the visibility of the parent div, the formview's insert item
template fields don't get cleared (restored) after either a cancel or an
insert.
Obviously I can work around this with little to no trouble, but I am curious
why it happens. Anyone have any ideas?
Drew