%
@ Register Src="~/UserControls/ExecutionMktSeg.ascx" TagName="ExecutionMktSeg"
TagPrefix="ucKpi" %>
<%
--<%@ Register Src="~/UserControls/ExecutionMktSegMobile.ascx" TagName="ExecutionMktSegMobile"
TagPrefix="ucMktSeg" %>--
%>
<
asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<telerik:RadTabStrip ID="RadTabStrip1" runat="server"
MultiPageID="RadMultiPage1" SelectedIndex="0">
<tabs>
<telerik:RadTab runat="server" Text="Desktop" PageViewID="DesktopPageView"></telerik:RadTab>
<telerik:RadTab runat="server" Text="Mobile" PageViewID="MobilePageView" ></telerik:RadTab>
<telerik:RadTab runat="server" Text="Server" PageViewID="ServerPageView"
Selected="True" ></telerik:RadTab>
<telerik:RadTab runat="server" Text="GPG" PageViewID="GPGPageView" ></telerik:RadTab>
<%
-- <telerik:RadTab runat="server" Text="Misc" PageViewID="MiscPageView" ></telerik:RadTab>--%>
</tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage ID="RadMultiPage1" runat="server"
RenderSelectedPageOnly="false" SelectedIndex="0">
<telerik:RadPageView ID="DesktopPageView" runat="server">
<asp:Table ID="Table1" runat="server" Width="100%">
<%
-- <tr>
<td>
<label ID="commitpackowner" runat="server" text="PC (Tjone Irene)"></label>
</td>
</tr>--
%>
<asp:TableRow ID="TableRow1" runat="server">
<asp:TableCell ID="TableCell1" runat="server">
<asp:Button ID="btn_DesktopCommitPackTr" runat="server" CssClass="GridButton" Text="Commit & Pack (Hide)" OnClick="GridDisplayControl"></asp:Button>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow ID="TableRow9" runat="server">
<asp:TableCell ID="DesktopCommitPackTr" runat="server">
<ucKpi:ExecutionMktSeg ID="DesktopCommitPack" runat="server" />
</asp:TableCell>
</asp:TableRow>
<asp:TableRow ID="TableRow2" runat="server">
<asp:TableCell ID="TableCell2" runat="server">
<asp:Button ID="btn_DesktopUTSTr" runat="server" CssClass="GridButton" Text="UTS Inventory (Hide)" OnClick="GridDisplayControl"></asp:Button>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</telerik:RadPageView>
<%
-- <telerik:RadPageView ID="MiscPageView" runat="server">
<ucKpi:ExecutionKpi ID="MiscMktSeg" runat="server" />
</telerik:RadPageView>--
%>
</telerik:RadMultiPage>
</
asp:Content>
protected void GridDisplayControl(object sender, EventArgs e)
{
string gridID = this.ToggleGridDisplay(sender, e);
Control executionGrid = (Control)DeepFindControl(this.Page, gridID);
if (executionGrid != null)
{
if (executionGrid.Visible == true)
{
executionGrid.Visible =
false;
((
Button)sender).Text = ((Button)sender).Text.Replace("Hide", "Show");
}
else
{
executionGrid.Visible =
true;
((
Button)sender).Text = ((Button)sender).Text.Replace("Show", "Hide");
}
}
}
private string ToggleGridDisplay(object sender, EventArgs e)
{
string buttonId = ((Button)sender).ID;
string gridID = buttonId.Split('_')[1];
return gridID;
}
private Control DeepFindControl(Control control, string id)
{
Control foundControl = null;
if (control.ID == id)
{
foundControl = control;
}
if (control.HasControls())
{
Control tempControl;
foreach (Control subcontrol in control.Controls)
{
tempControl = DeepFindControl(subcontrol, id);
if (tempControl != null)
{
foundControl = tempControl;
}
}
}
return foundControl;
}