ArtK
ArtK

Reputation: 1185

Interaction between 2 AJAX update panels

I have a website with two panels. Actions in one affect controls in the other. So in the first panel I have GridView. If a row is selected the details of that row get displayed in the other panel. I can update record in second panel, submit it and refresh GridView in the first panel. I tried to put each panel into its own AJAX Update Panel so only affected data would be affected but that doesn't seem to work. Controls in the second panel don't get updated when events in the first one get fired. Any suggestions how this problem could be addressed? FYI each panel is a div tag inside master page so in the actual aspx they controls live in own asp:Content

Upvotes: 0

Views: 138

Answers (1)

PetarPenev
PetarPenev

Reputation: 339

You can try to add an AsyncPostBackTrigger:

UpdatePanel2.Triggers.Add(new AsyncPostBackTrigger()
{
    ControlID = UpdatePanel1.UniqueID,
    EventName = "RowUpdated"
});

Alternatively, after the first panel is changed, you can manually update the second panel:

updatePanel2.Update();

Upvotes: 1

Related Questions