Usercontrols not being VISUALLY updated

Discussion in 'ASP .Net' started by Cirene, May 17, 2008.

  1. Cirene

    Cirene Guest

    I have some user controls that are inside a formview control. I use the
    usercontrols in the EditItemTemplate, ItemTemplate and the
    InsertItemTemplate of the formview. In a 3 templates the user controls have
    the exact same name (uc1, uc2, uc3).

    In my formview_modechanging even I am trying to autopopulate the user
    controls, if data exists. I debug the code and I can see the before and
    after results of the text fields changing etc... in each user control. It
    seems to work fine.

    But, when the code finishes and the form is shown they are still
    untouched/empty.

    Any ideas what could be wrong?

    Thanks.
    Cirene, May 17, 2008
    #1
    1. Advertising

  2. Cirene

    Rain Guest

    What happens if you manually set a text field on one of the controls in the
    page's pre-render event. Does the change get reflected ?

    If not, does it get reflected if you do the same for the user control ?

    Take some basic steps to see where this is falling down.




    "Cirene" <> wrote in message
    news:...
    >I have some user controls that are inside a formview control. I use the
    >usercontrols in the EditItemTemplate, ItemTemplate and the
    >InsertItemTemplate of the formview. In a 3 templates the user controls
    >have the exact same name (uc1, uc2, uc3).
    >
    > In my formview_modechanging even I am trying to autopopulate the user
    > controls, if data exists. I debug the code and I can see the before and
    > after results of the text fields changing etc... in each user control. It
    > seems to work fine.
    >
    > But, when the code finishes and the form is shown they are still
    > untouched/empty.
    >
    > Any ideas what could be wrong?
    >
    > Thanks.
    >
    Rain, May 18, 2008
    #2
    1. Advertising

  3. Cirene

    Cirene Guest

    In the Page_Prerender I cannot yet refer to the user control, which is
    located within the formview.

    Maybe because the formview is based on the gridview's selected data????



    "Rain" <> wrote in message
    news:...
    > What happens if you manually set a text field on one of the controls in
    > the page's pre-render event. Does the change get reflected ?
    >
    > If not, does it get reflected if you do the same for the user control ?
    >
    > Take some basic steps to see where this is falling down.
    >
    >
    >
    >
    > "Cirene" <> wrote in message
    > news:...
    >>I have some user controls that are inside a formview control. I use the
    >>usercontrols in the EditItemTemplate, ItemTemplate and the
    >>InsertItemTemplate of the formview. In a 3 templates the user controls
    >>have the exact same name (uc1, uc2, uc3).
    >>
    >> In my formview_modechanging even I am trying to autopopulate the user
    >> controls, if data exists. I debug the code and I can see the before and
    >> after results of the text fields changing etc... in each user control.
    >> It seems to work fine.
    >>
    >> But, when the code finishes and the form is shown they are still
    >> untouched/empty.
    >>
    >> Any ideas what could be wrong?
    >>
    >> Thanks.
    >>

    >
    >
    Cirene, May 18, 2008
    #3
  4. Cirene

    Cirene Guest

    If I do this...

    CType(FormView1.FindControl("ucToMon"), common_ucTimeSelect).GetWholeTime

    I DO see that the control should have a time of "2:02 PM". But visually it
    does not.

    Is this because the usercontrols have the same name in the various
    templates?

    "Rain" <> wrote in message
    news:...
    > What happens if you manually set a text field on one of the controls in
    > the page's pre-render event. Does the change get reflected ?
    >
    > If not, does it get reflected if you do the same for the user control ?
    >
    > Take some basic steps to see where this is falling down.
    >
    >
    >
    >
    > "Cirene" <> wrote in message
    > news:...
    >>I have some user controls that are inside a formview control. I use the
    >>usercontrols in the EditItemTemplate, ItemTemplate and the
    >>InsertItemTemplate of the formview. In a 3 templates the user controls
    >>have the exact same name (uc1, uc2, uc3).
    >>
    >> In my formview_modechanging even I am trying to autopopulate the user
    >> controls, if data exists. I debug the code and I can see the before and
    >> after results of the text fields changing etc... in each user control.
    >> It seems to work fine.
    >>
    >> But, when the code finishes and the form is shown they are still
    >> untouched/empty.
    >>
    >> Any ideas what could be wrong?
    >>
    >> Thanks.
    >>

    >
    >
    Cirene, May 18, 2008
    #4
  5. Cirene

    Cirene Guest

    Oh by the way, all these controls are within a MASTER page. I wonder if
    that matters...

    "Cirene" <> wrote in message
    news:%...
    > If I do this...
    >
    > CType(FormView1.FindControl("ucToMon"), common_ucTimeSelect).GetWholeTime
    >
    > I DO see that the control should have a time of "2:02 PM". But visually
    > it does not.
    >
    > Is this because the usercontrols have the same name in the various
    > templates?
    >
    > "Rain" <> wrote in message
    > news:...
    >> What happens if you manually set a text field on one of the controls in
    >> the page's pre-render event. Does the change get reflected ?
    >>
    >> If not, does it get reflected if you do the same for the user control ?
    >>
    >> Take some basic steps to see where this is falling down.
    >>
    >>
    >>
    >>
    >> "Cirene" <> wrote in message
    >> news:...
    >>>I have some user controls that are inside a formview control. I use the
    >>>usercontrols in the EditItemTemplate, ItemTemplate and the
    >>>InsertItemTemplate of the formview. In a 3 templates the user controls
    >>>have the exact same name (uc1, uc2, uc3).
    >>>
    >>> In my formview_modechanging even I am trying to autopopulate the user
    >>> controls, if data exists. I debug the code and I can see the before and
    >>> after results of the text fields changing etc... in each user control.
    >>> It seems to work fine.
    >>>
    >>> But, when the code finishes and the form is shown they are still
    >>> untouched/empty.
    >>>
    >>> Any ideas what could be wrong?
    >>>
    >>> Thanks.
    >>>

    >>
    >>

    >
    >
    Cirene, May 18, 2008
    #5
    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. david wolf
    Replies:
    1
    Views:
    418
    java-john
    Mar 23, 2006
  2. Sharon

    CSS & Visually Impaired

    Sharon, Feb 22, 2004, in forum: HTML
    Replies:
    6
    Views:
    1,005
    Andy Dingley
    Feb 24, 2004
  3. tatichan

    Visually Design XML???

    tatichan, Apr 6, 2005, in forum: XML
    Replies:
    1
    Views:
    431
    Bill Harris
    Apr 6, 2005
  4. Michael Chermside

    Needed: Python IDE for the visually impaired

    Michael Chermside, May 6, 2004, in forum: Python
    Replies:
    1
    Views:
    514
    Neil Hodgson
    May 8, 2004
  5. Dmitry Korolyov

    Datagrid not updated during delete, but updated during insert and update

    Dmitry Korolyov, Sep 22, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    406
    Dmitry Korolyov
    Sep 22, 2003
Loading...

Share This Page