the lbBuildProjection LinkButton resides within:
Master Page
==> TabContainer
==> Gridview
==> Command Column
==> LinkButton lbBuildProjection
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script language="javascript" type="text/javascript">
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
function BeginRequestHandler(sender, args) {
var nm = sender.toString();
var str1 = new String(sender._postBackSettings.sourceElement.id);
var idx = sender._postBackSettings.sourceElement.id.indexOf("lbBuildProjection");
if (idx > -1) {
var buttonId = sender._postBackSettings.sourceElement.id;
var button = document.getElementsByName(buttonId);
button.disabled = true;
}
}
function EndRequestHandler(sender, args) {
var button = document.getElementById("<%= lbBuildProjection.ClientID %>");
button.disabled = false;
}
</script>
<cc1:TabContainer ID="tcProjections" runat="server" Width="100%" ActiveTabIndex="0" >
<cc1:TabPanel runat="server" ID="TabPanel1" HeaderText="Projection Setup">
<ContentTemplate>
<asp:GridView ID="gvPPProj" runat="server" AutoGenerateColumns="False" DataKeyNames="QPPProjId" DataSourceID="ldsPPProj" OnRowCommand="gvPPProj_RowCommand" onrowupdating="gvPPProj_RowUpdating" CellPadding="4" ForeColor="#333333" GridLines="Vertical" onrowcreated="gvPPProj_RowCreated" onrowdeleting="gvPPProj_RowDeleting" CssClass="ComicSmall100CenterRb" AllowSorting="True">
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<Columns>
<asp:TemplateField ShowHeader="False">
<EditItemTemplate>
<asp:LinkButton ID="lbUpdate" runat="server" CausesValidation="True" CommandName="Update" Text="Update" ToolTip="Save this projection row"></asp:LinkButton>
<asp:LinkButton ID="lbCancel" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" ToolTip="cancel the edit of this row"></asp:LinkButton>
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton ID="lbEdit" runat="server" CausesValidation="False" CommandName="Edit" Text="Edit" ToolTip="Edit this row"></asp:LinkButton>
<asp:LinkButton ID="lbNew" runat="server" CausesValidation="False" CommandName="New" Text="New" ToolTip="Add a New Projection Row"></asp:LinkButton>
<asp:LinkButton ID="lbSelect" runat="server" CausesValidation="False" CommandName="Select" Text="Select" ToolTip="Choose this row to make Projection"></asp:LinkButton>
<asp:LinkButton ID="lbDelete" runat="server" CausesValidation="False" CommandName="Delete" Text="Delete" ToolTip="Delete this row (Use Caution)" Enabled="False" Visible="False"></asp:LinkButton>
<asp:UpdatePanel ID="pnlGrid" runat="server" UpdateMode = "Conditional" >
<ContentTemplate>
<asp:LinkButton ID="lbBuildProjection" runat="server" CausesValidation="False" CommandName="BuildProjection"
Text="Build Projections" ToolTip="Project Targeting $"
></asp:LinkButton>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="lbBuildProjection" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</ItemTemplate>
|