locked
update panel - how to prevent parent panel from updating RRS feed

  • Question

  • User136616180 posted

    I have a parent UpdatePanel (panelParent) and within it, I have another UpdatePanel (panelChild).

    I have parentChild set to:
     - ChildrenAsTriggers = false
     - UpdateMode = conditional

    When I click on my linkbuttons within the panelChild panel, the entire panelParent refreshes.

    How can I prevent the parent control from updating?

    Thanks,
    John

    Sunday, September 13, 2009 7:40 AM

Answers

  • User1564875471 posted

    it must be like the child panel:

    - ChildrenAsTriggers = false

    In this case, There is no need to set ChildrenAsTriggers proeprty to false.

    Reference to MSDN[Taken from this link]

    Child controls of nested UpdatePanel controls will not cause an update of the parent UpdatePanel control's content unless you call the Update method explicitly or you define the child controls as triggers.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, September 13, 2009 8:08 AM
  • User1414178881 posted

    for your child panel,change ChildrenAsTriggers to true!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 14, 2009 3:17 AM

All replies

  • User1564875471 posted

    Also, you will need to set the UpdateMode="Conditional" for the outer UpdatePanel ( parent ).


    See  "Using Nested UpdatePanel Controls " section in this link for an example.

    Sunday, September 13, 2009 7:55 AM
  • User1414178881 posted

    I have parentChild set to:
     - ChildrenAsTriggers = false
     - UpdateMode = conditional

    What about the parent panel? it must be like the child panel:

    - ChildrenAsTriggers = false
     - UpdateMode = conditional


    Sunday, September 13, 2009 7:59 AM
  • User1564875471 posted

    it must be like the child panel:

    - ChildrenAsTriggers = false

    In this case, There is no need to set ChildrenAsTriggers proeprty to false.

    Reference to MSDN[Taken from this link]

    Child controls of nested UpdatePanel controls will not cause an update of the parent UpdatePanel control's content unless you call the Update method explicitly or you define the child controls as triggers.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, September 13, 2009 8:08 AM
  • User136616180 posted

    Thanks guys...


    I've set both the parent and the child update panel to:


    - ChildrenAsTriggers = false
     - UpdateMode = conditional


    yet, each time I click on the linkbutton in the PagingBulletedList, it postsback and refreshes the parent updatepanel.


    What else could I be missing?

    Sunday, September 13, 2009 5:54 PM
  • User1414178881 posted

    for your child panel,change ChildrenAsTriggers to true!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 14, 2009 3:17 AM
  • User-1826049516 posted

    Hey,

    Sorry for the hijack - thought it better than starting again.

    I have exactly the same problem. I want to stop the child panel from updating the parent panel.

    My structure is like this:

    ParentUpdatePanel > Repeater > ChildUpdatePanel > Repeater.

    The child update panel is a list of attachments for a given item. When somebody refreshes the list of attachments, I don't want the parent panel to refresh as well.

    I have both panels set to Conditional and ChildrenAsTriggers set to false for the parent, and true for the child.

     

    Thanks

    EDIT: It seems that pressing the Enter key if the updatepanel has focus is causing the postback. Can I disable this if the updatepanel has focus. I have a textbox outside the updatepanel that should still update the updatepanel when pressing the enter key.

    EDIT2: Actually, it's not just Enter key - I put a button inside the child panel and it is updating the parent panel.

    Monday, January 20, 2014 4:47 AM