Regarding visibility of a templated control and built-in events

Discussion in 'ASP .Net Web Controls' started by DCW, Mar 28, 2007.

  1. DCW

    DCW Guest

    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
     
    DCW, Mar 28, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. RA Scheltema
    Replies:
    3
    Views:
    404
    RA Scheltema
    Jan 6, 2004
  2. Marijn
    Replies:
    5
    Views:
    464
    Marijn
    Feb 13, 2004
  3. Replies:
    0
    Views:
    2,235
  4. Michel Couche
    Replies:
    0
    Views:
    938
    Michel Couche
    Oct 20, 2006
  5. Amadeus W. M.
    Replies:
    2
    Views:
    394
    Amadeus W. M.
    Jul 4, 2006
Loading...

Share This Page