<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ScorecardInteractive.ascx.cs"
    Inherits="Zap.BI.Portal.Controls.UserControls.ResourceControls.Scorecards.ScorecardInteractive" %>

<zapWeb:QueryParameterContainer runat="server" ID="filterPane" />
<%--Inner Content--%>
<%--This button does absolutely nothing, but is absolutely necessary to prevent DevEx code from exploding when loading a scorecard in a dashboard cell.--%>
<asp:Button runat="server" ID="UpdateViewTrigger" CssClass="UpdateViewTrigger" Style="display: none;" />
<div runat="server" id="ScorecardViewContainer">
    <dx:ASPxTreeList runat="server" ID="ScorecardTree" AutoGenerateColumns="False" EnableCallbacks="False"
        DataCacheMode="Disabled" EnableDefaultAppearance="False">
        <Settings GridLines="Both" />
        <Styles EnableDefaultAppearance="false" CssPostfix="SC">
            <AlternatingNode Enabled="True" />
        </Styles>
        <SettingsBehavior AllowFocusedNode="false" FocusNodeOnExpandButtonClick="false" FocusNodeOnLoad="false"
            ExpandCollapseAction="Button" AllowSort="false" AllowDragDrop="false" />
        <SettingsEditing AllowNodeDragDrop="false" />
        <SettingsSelection Enabled="false" />
        <SettingsCookies Enabled="false" />
        <SettingsCustomizationWindow Caption="<%$ Resources: Controls.UserControls.ResourceControls.Scorecards.ScorecardViewText, Title_CustomizationWindow %>"
            PopupHorizontalAlign="LeftSides" PopupVerticalAlign="TopSides" Enabled="True"
            PopupHorizontalOffset="30" PopupVerticalOffset="30" />
        <Columns>
            <dx:TreeListDataColumn Name="Name" FieldName="Name" VisibleIndex="0" Width="200"
                Caption="<%$ Resources: Controls.ControlText, Label_Name %>">
                <DataCellTemplate>
                    <asp:PlaceHolder runat="server" ID="LinkPlaceholder" OnDataBinding="LinkPlaceholder_DataBinding">
                        <div class="RowTitleWrapper">
                            <asp:Label runat="server" ID="RowTitleText" CssClass="RowTitleText" EnableViewState="false" />
                            <asp:TextBox runat="server" ID="RowTitleTextEdit" CssClass="RowTitleTextEdit" EnableViewState="false" />
                            <span class="RowLinkWrapper">
                                <asp:Image runat="server" ID="DrillIntoLink" EnableViewState="false" />
                            </span>
                        </div>
                    </asp:PlaceHolder>
                </DataCellTemplate>
            </dx:TreeListDataColumn>
            <dx:TreeListTextColumn Name="Actual" FieldName="Actual" VisibleIndex="1" ReadOnly="True"
                Width="50" />
            <dx:TreeListTextColumn Name="Target" FieldName="Target" VisibleIndex="2" ReadOnly="True"
                Width="50" />
            <dx:TreeListDataColumn Name="Status" FieldName="Status" VisibleIndex="3" Width="50"
                CellStyle-HorizontalAlign="Center" CellStyle-VerticalAlign="Middle">
                <DataCellTemplate>
                    <asp:PlaceHolder runat="server" ID="StatusPlaceholder" EnableViewState="false" OnDataBinding="StatusPlaceholder_DataBinding" />
                </DataCellTemplate>

                <CellStyle HorizontalAlign="Center" VerticalAlign="Middle"></CellStyle>
            </dx:TreeListDataColumn>
            <%-- Anchor hidden by default --%>
            <dx:TreeListTextColumn Name="Anchor" FieldName="Anchor" VisibleIndex="4" ReadOnly="True"
                Width="50" />
            <%-- Variance hidden by default --%>
            <dx:TreeListTextColumn Name="Variance" FieldName="Variance" VisibleIndex="5" ReadOnly="True"
                Width="50" />
            <dx:TreeListTextColumn Name="Previous" FieldName="Previous" VisibleIndex="6" ReadOnly="True"
                Width="50" />
            <dx:TreeListDataColumn Name="Trend" FieldName="Trend" VisibleIndex="7" ReadOnly="True"
                Width="50" CellStyle-HorizontalAlign="Center" CellStyle-VerticalAlign="Middle">
                <DataCellTemplate>
                    <asp:PlaceHolder runat="server" ID="TrendPlaceholder" EnableViewState="false" OnDataBinding="TrendPlaceholder_DataBinding" />
                </DataCellTemplate>

                <CellStyle HorizontalAlign="Center" VerticalAlign="Middle"></CellStyle>
            </dx:TreeListDataColumn>
            <dx:TreeListTextColumn HeaderStyle-CssClass="WeightColumn" CellStyle-CssClass="WeightColumn"
                Name="Weight" FieldName="Weight" VisibleIndex="8" ReadOnly="True" Width="50">
                <HeaderStyle CssClass="WeightColumn"></HeaderStyle>

                <CellStyle CssClass="WeightColumn"></CellStyle>
            </dx:TreeListTextColumn>
        </Columns>
    </dx:ASPxTreeList>
    </div>