<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="FinIQ_MPG_ZoomMaster.aspx.vb" Inherits="FinIQWebApp.FinIQ_MPG_ZoomMaster" MasterPageFile="~/FiniqAppMasterPage.Master" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"></asp:ScriptManagerProxy>
    <script src="../FinIQJS/SortFilter_Grid.js"></script>
    <style type="text/css">
        .tdbrk {
            width: 5px;
        }

        .button {
            Width: 70px;
        }

        .upperdiv {
            padding-top: 6px;
            padding-left: 5px;
            border: none;
        }

        .lowerdiv {
            padding-top: 10px;
        }

        .gridCol {
            width: 180px;
        }

        .gridCol1 {
            width: 100px;
        }

        .ddlwidth {
            width: 170px !important;
        }

        .ddlwidth1 {
            width: 150px !important;
        }

        .ddlPriority {
            width: 50px;
        }

        #ctl00_MainContent_gvZoomMaster_ctl03_ddlZoom_Button_Id-button, #ctl00_MainContent_gvZoomMaster_ctl03_ddlLeft_Blotter_BCM_Id-button, #ctl00_MainContent_gvZoomMaster_ctl03_ddlRight_Blotter_BCM_Id-button {
            width: 170px !important;
        }

        .divLoading {
            position: absolute;
            left: 430px;
            top: 60px;
        }

        .ActiveN {
            background-color: #F7F7F7;
        }

        .divLoading {
            position: absolute;
            top: 48px;
            left: 460px;
        }

        .aspNetDisabled a {
            color: #000000 !important;
        }
        /*Added By: Tejas V. Bodas on 20/09/2017 to make word wrap*/
        .wrapcol {
            word-break: break-word;
            white-space: normal;
        }

        .lblWidth {
            width: 96px;
        }

        .lblWidth1 {
            width: 104px;
        }

        .lblWidth2 {
            width: 33px;
        }

        .ddlwidth2 {
            width: 238px;
        }
        .ddlBlotterCode {
            min-width:238px !important;
        }

        .tdButton {
            width: 77px;
        }

        .width1 {
            min-width: 55px;
            max-width: 55px;
        }

        .width2 {
            min-width: 40px;
            max-width: 40px;
        }

        .width3 {
            min-width: 63px;
            max-width: 63px;
        }

        .width4 {
            min-width: 170px;
            max-width: 170px;
        }
        
        .width5 {
            min-width: 80px;
            max-width: 80px;
        }
        
        .width6 {
            min-width: 177px;
            max-width: 177px;
        }
        
        .width7 {
            min-width: 73px;
            max-width: 73px;
        }
        
        .width8 {
            min-width: 107px;
            max-width: 107px;
        }
        
        .width9 {
            min-width: 100px;
            max-width: 100px;
        }
        
    </style>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanelCP"
        DisplayAfter="0">
        <ProgressTemplate>
            <div class="divLoading">
                <img alt="Loading" src="../App_Resources/loading.gif" /><span class="lbl">Loading...&nbsp;&nbsp;</span>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="UpdatePanelCP" runat="server" class="PanelPad">
        <ContentTemplate>
            <div class="upperdiv" id="TopContainer">

                <table>
                    <tr>
                        <td>
                            <asp:Label ID="lblError" runat="server" CssClass="lblError"></asp:Label>
                        </td>
                    </tr>
                </table>

                <table id="tbMain" runat="server">
                    <tr>
                        <td>
                            <div id="config_filter" runat="server">
                                <td class="lblWidth">
                                    <asp:Label ID="Label1" CssClass="lbl lblBlotterCode" Width="91px" runat="server" Visible="True" Text="Left Blotter BCM"></asp:Label>
                                </td>
                                <td class="ddlwidth2">
                                    <asp:DropDownList ID="ddlBlotterLeft" runat="server" CssClass="ddl ddlBlotterCode" AutoPostBack="true" />
                                </td>
                                <td class="lblWidth1">
                                    <asp:Label ID="Label2" CssClass="lbl lblBlotterCode" Width="99px" runat="server" Visible="True" Text="Right Blotter BCM"></asp:Label>
                                </td>
                                <td class="ddlwidth2">
                                    <asp:DropDownList ID="ddlBlotterRight" runat="server" CssClass="ddl ddlBlotterCode" AutoPostBack="true" />
                                </td>
                            </div>
                        </td>
                        <td>
                            <asp:Button class="btn button" ID="btnLoad" runat="server" Text="Load" />
                        </td>
                        <td>
                            <asp:Button class="btn button" ID="btnAdd" runat="server" Text="Add" />
                        </td>
                        <td class="tdButton">
                            <asp:Button class="btn button" ID="btnSave" runat="server" Text="Save" />
                        </td>
                        <td>
                            <asp:Label ID="lblZoombtnname" runat="server" Text="Zoom Button Name :" />
                            <%--Added by Nikhil Mali on 30-01-2020--%>
                        </td>
                        <td>
                            <asp:TextBox ID="txtZoombtnName" onkeyup="getenterload()" runat="server" onkeypress="allowAlphaSpace(event)" Width="140px" />
                            <%--Added by Nikhil Mali on 30-01-2020--%>
                        </td>
                        <td>
                            <asp:Label ID="lblRowCount" runat="server" CssClass="lbl">Total Record(s)  : </asp:Label>
                        </td>
                        <td class="lblWidth2">
                            <asp:Label ID="lblTotRecord" runat="server" CssClass="lbl"></asp:Label>&nbsp;
                        </td>
                        
                    </tr>
                </table>
            </div>
            <div class="lowerdiv">
                <table id="Table1" runat="server" style="margin-left: 7px;">
                    <tr>
                        <td>
                            <asp:GridView ID="gvZoomMaster" runat="server" ShowHeaderWhenEmpty="true" EmptyDataText="No Records Found" BorderWidth="1"
                                rules="All" ShowHeader="true" AllowPaging="False" PageSize="20" PagerStyle-Height="32px"
                                AutoGenerateColumns="false" HeaderStyle-CssClass="GridHeaderTitle" Width="100%"
                                CssClass="Grid" CellPadding="0" RowHeadersWidthSizeMode="DisableResizing;" SelectedRowStyle-Wrap="true"
                                CellSpacing="0">

                                <SelectedRowStyle CssClass="GridItemSelect" />
                                <RowStyle CssClass="GridItem" />
                                <HeaderStyle CssClass="GridHeader" />
                                <FooterStyle CssClass="GridFooter" />
                                <%--Added BY: Tejas V. Bodas on 28/08/2017 to add paging--%>
                                <PagerSettings Mode="NumericFirstLast"
                                    FirstPageText="First"
                                    LastPageText="Last"
                                    Position="Bottom" />
                                <PagerStyle CssClass="GridPager" />
                                <EmptyDataTemplate>
                                    <asp:Label ID="lbldatagrid" runat="server" CssClass="lbl" Text="No data found."></asp:Label>
                                </EmptyDataTemplate>
                                <Columns>
                                    <asp:CommandField ButtonType="Link" ShowEditButton="true" CancelText="Cancel" UpdateText=""
                                        EditText="Edit" ItemStyle-HorizontalAlign="Center" HeaderStyle-CssClass="width2" ItemStyle-CssClass="width2"></asp:CommandField>

                                    <asp:TemplateField HeaderText="Zoom Id" Visible="false">
                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="true" CssClass="gridCol1"></HeaderStyle>
                                        <ItemStyle HorizontalAlign="right" Wrap="true" CssClass="gridCol1 wrapcol" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblZoom_Id" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Zoom_Id").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Zoom Button Name" HeaderStyle-CssClass="width4" ItemStyle-CssClass="width4">
                                        <ItemTemplate>
                                            <asp:Label ID="lblZoom_Button_Id" CssClass="lbl wrapcol" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Zoom_Button_Id").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlZoom_Button_Id" CssClass="ddl width6" runat="server" AutoPostBack="true">
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Left Blotter BCM">
                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="true" Width="120"></HeaderStyle>
                                        <ItemStyle HorizontalAlign="left" Wrap="true" Width="120" CssClass="wrapcol" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblLeft_Blotter_BCM_Id" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Left_Blotter_BCM_Id").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlLeft_Blotter_BCM_Id" CssClass="ddl width6" runat="server" AutoPostBack="true">
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Left Blotter Column" HeaderStyle-CssClass="width4" ItemStyle-CssClass="width4">
                                        <ItemTemplate>
                                            <asp:Label ID="lblLeft_Blotter_Column" CssClass="lbl wrapcol" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Left_Blotter_Column").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlLeft_Blotter_Column" CssClass="ddl width6" runat="server" AutoPostBack="true">
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Left Blotter Column DataType" HeaderStyle-CssClass="width7" ItemStyle-CssClass="width7">
                                        <ItemTemplate>
                                            <asp:Label ID="lblLeft_Blotter_Column_DataType" CssClass="lbl wrapcol" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Left_Blotter_Column_DataType").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtLeft_Blotter_Column_DataType" CssClass="txt width5" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Left_Blotter_Column_DataType").ToString)%>' />
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Blotter Column Comparator" HeaderStyle-CssClass="width1" ItemStyle-CssClass="width1">
                                        <ItemTemplate>
                                            <asp:Label ID="lblBlotter_Column_Comparator" CssClass="lbl wrapcol width1" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Blotter_Column_Comparator").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlBlotter_Column_Comparator" CssClass="ddl width3" runat="server">
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="New Object" HeaderStyle-CssClass="width9" ItemStyle-CssClass="width9">
                                        <ItemTemplate>
                                            <asp:Label ID="lblNew_Object" CssClass="lbl wrapcol" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.New_Object").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlNew_Object" CssClass="ddl width8" runat="server" AutoPostBack="true">
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Right Blotter BCM" HeaderStyle-CssClass="width4" ItemStyle-CssClass="width4">
                                        <ItemTemplate>
                                            <asp:Label ID="lblRight_Blotter_BCM_Id" CssClass="lbl wrapcol" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Right_Blotter_BCM_Id").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlRight_Blotter_BCM_Id" CssClass="ddl width6" runat="server" AutoPostBack="true">
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Right Blotter Column" HeaderStyle-CssClass="width4" ItemStyle-CssClass="width4">
                                        <ItemTemplate>
                                            <asp:Label ID="lblRight_Blotter_Column" CssClass="lbl wrapcol" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Right_Blotter_Column").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlRight_Blotter_Column" CssClass="ddl width6" runat="server" AutoPostBack="true">
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Right Blotter Column DataType" HeaderStyle-CssClass="width7" ItemStyle-CssClass="width7">
                                        <ItemTemplate>
                                            <asp:Label ID="lblRight_Blotter_Column_DataType" CssClass="lbl wrapcol" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Right_Blotter_Column_DataType").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtRight_Blotter_Column_DataType" CssClass="txt width5" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Right_Blotter_Column_DataType").ToString)%>' />
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Priority" HeaderStyle-CssClass="width2" ItemStyle-CssClass="width2">
                                        <ItemTemplate>
                                            <asp:Label ID="lblPriority" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Priority").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlPriority" Style="text-align: right" CssClass="ddl ddlPriority" runat="server" AutoPostBack="true">
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Created By" Visible="false">
                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="true" CssClass="gridCol"></HeaderStyle>
                                        <ItemStyle HorizontalAlign="Left" Wrap="true" CssClass="gridCol wrapcol" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblZoomMaster_Created_By" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ZoomMaster_Created_By").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtZoomMaster_Created_By" CssClass="txt" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ZoomMaster_Created_By").ToString)%>' />
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Created At" Visible="false">
                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="true" CssClass="gridCol1"></HeaderStyle>
                                        <ItemStyle HorizontalAlign="Left" Wrap="true" CssClass="gridCol1 wrapcol" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblZoomMaster_Created_At" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ZoomMaster_Created_At").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtZoomMaster_Created_At" CssClass="txt" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ZoomMaster_Created_At").ToString)%>' />
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Width" HeaderStyle-CssClass="width2" ItemStyle-CssClass="width2">
                                        <ItemStyle HorizontalAlign="Right"/>
                                        <ItemTemplate>
                                            <asp:Label ID="lblWidth" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Width").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtWidth" CssClass="txt" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Width").ToString)%>' Width="47px" />
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Height" HeaderStyle-CssClass="width2" ItemStyle-CssClass="width2">
                                        <ItemStyle HorizontalAlign="Right"/>
                                        <ItemTemplate>
                                            <asp:Label ID="lblHeight" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Height").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtHeight" CssClass="txt" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Height").ToString)%>' Width="47px" />
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Active YN">
                                        <HeaderStyle Wrap="true" Width="40px"></HeaderStyle>
                                        <ItemStyle Wrap="true" Width="40px" HorizontalAlign="Center" />
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkActiveYN" CssClass="chk" AutoPostBack="true" runat="server" OnCheckedChanged="chkActiveYN_CheckedChanged"></asp:CheckBox>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:CheckBox ID="chkActiveYN" CssClass="chk" AutoPostBack="true" runat="server" OnCheckedChanged="chkActiveYN_CheckedChanged"></asp:CheckBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                </Columns>
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>

    <script type="text/javascript">
        function getenterload() {                      //Added by Nikhil Mali on 30-01-2020
            if (event.keyCode == 13)// Enter
            {
                document.getElementById('ctl00_MainContent_btnLoad').click();
            }
        }

        function allowAlphaSpace(e) {                          // Added By Nikhil Mali on 30-1-2020
            var code = ('charCode' in e) ? e.charCode : e.keyCode;
            if (!(code == 32) &&               // space
              !(code == 45) &&                 // '-' symbol
              !(code > 64 && code < 91) &&     // upper alpha (A-Z)
              !(code > 96 && code < 123)) {    // lower alpha (a-z)
                //!(code > 47 && code < 58) && // numeric (0-9)
                e.preventDefault();
            }
        }

        //<START>---Added By Shubham Podhade on 27-Jan-2019 for JS Sorting Searching Filters
        $(document).ready(function () {
            debugger;
            SetSorting_Filter1();
        });
        //<END>---Added By Shubham Podhade on 27-Jan-2019 for JS Sorting Searching Filters
    </script>
</asp:Content>

