Reputation: 35
inside updatepanel condtional mode i am not able to enable/disable my button.
</asp:ToolkitScriptManager><asp:UpdatePanel ID="UpdatePanel5" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<ContentTemplate>
<div class="buttons"><asp:Button ID="btnReturn" runat="server" Text="Return to Policy" onclick="btnReturn_Click" /> <asp:Button ID="lnkbtnEndorse" runat="server" Text="Import Data" onclick="lnkbtnEndorse_Click" />
<asp:Button ID="btnCompareTop" runat="server" Text="Compare"
onclick="Compare_Click" Enabled="false" />
<asp:Button ID="btnAdditionalInfoOpen" runat="server" Text="Additional Information" /> <asp:Button ID="Button3" runat="server" Text="Save" onclick="SaveCopy_Click" /></div> </ContentTemplate>
</asp:UpdatePanel>
i want to enable compare button in cs page.
code behind
grdNewEndorsement.AutoGenerateColumns = false;
grdNewEndorsement.DataBind();
this.Button1.Enabled = true;
this.btnCompareTop.Enabled = true;
Now button is enabled but btnAdditionalInfoOpen button is not opening pop up window
$('#ctl00_Main_btnAdditionalInfoOpen').click(function () {
$('#additional-info').dialog('open');
return false;
});
Upvotes: 0
Views: 1457
Reputation: 460228
If the UpdatePanel
's UpdateMode
is "Conditional" and ChildrenAsTriggers
is "false", you can(have to) update it manually:
this.btnCompareTop.Enabled = true;
UpdatePanel5.Update();
Upvotes: 1