I am having problems closing a Panel which is attached to a PopupControlExtender. The Panel opens up just fine, I fill out required forms and click on Add button. The code-behind gets executed and new data is displayed in a duynamic table but Panle remains
opened and I oinly have to click on Close button to close it. I've tried running
faremax
Member
229 Points
155 Posts
PopupControlExtender does not close
Apr 04, 2012 07:58 PM|LINK
I am having problems closing a Panel which is attached to a PopupControlExtender. The Panel opens up just fine, I fill out required forms and click on Add button. The code-behind gets executed and new data is displayed in a duynamic table but Panle remains opened and I oinly have to click on Close button to close it. I've tried running
ClientScript.RegisterClientScriptBlock(Me.GetType, "ClosePopup", "$find('popPanelSegments').hidePopup();")
But it does not work. Thanks
cool.asp
Member
544 Points
188 Posts
Re: PopupControlExtender does not close
Apr 04, 2012 08:12 PM|LINK
I just fixed the same problem on a Radio button that opens a radiobuttonList in extender...
Add this to your PopupControlExtender: CommitProperty="value" my code looks like this...
<asp:RadioButton ID="rbDiffAddress" runat="server" GroupName="Address" AutoPostBack="true" Text="Add New Household" oncheckedchanged="rbDiffAddress_CheckedChanged" /> <asp:Panel ID="Panel1" runat="server" BackColor="White"> <asp:RadioButtonList ID="rblAddresses" runat="server" RepeatColumns="3" AutoPostBack="true" onselectedindexchanged="rblAddresses_SelectedIndexChanged"> </asp:RadioButtonList> </asp:Panel> <asp:PopupControlExtender ID="PopupControlExtender1" runat="server" PopupControlID="Panel1" TargetControlID="rbDiffExisting" CommitProperty="value"> </asp:PopupControlExtender>At the end of rblAddresses_SelectedIndexChanged I put this line...
faremax
Member
229 Points
155 Posts
Re: PopupControlExtender does not close
Apr 04, 2012 08:17 PM|LINK
Works like a charm. thanks
cool.asp
Member
544 Points
188 Posts
Re: PopupControlExtender does not close
Apr 04, 2012 08:24 PM|LINK
yw, kind of funny how we were working on that at the same time lol
faremax
Member
229 Points
155 Posts
Re: PopupControlExtender does not close
Apr 04, 2012 08:37 PM|LINK
Yep. Was yours inside an UpdatePanel? I have suspicions that UpdatePanel is causing this issue.
cool.asp
Member
544 Points
188 Posts
Re: PopupControlExtender does not close
Apr 04, 2012 08:38 PM|LINK
I experienced a bug where rbDiffExisting radiobutton control was being deselected on postback from a button on my page.
I fixed it by changing CommitProperty="value" to CommitProperty="text".
...and yes it is in an update panel
faremax
Member
229 Points
155 Posts
Re: PopupControlExtender does not close
Apr 04, 2012 08:43 PM|LINK
That's what i thought. Ok, thanks again for the help.