Regarding visibility of a templated control and built-in events


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
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top