<%@ Page Language="vb" AutoEventWireup="false" ValidateRequest="false" CodeBehind="FinIQ_Template_Master.aspx.vb" Inherits="FinIQWebApp.FinIQ_Template_Master" MasterPageFile="~/FiniqAppMasterPage.Master" Title="Template Master" MaintainScrollPositionOnPostback="true" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Import Namespace="Microsoft.Security.Application" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <link href="../App_Themes/Style1.css" rel="stylesheet" type="text/css" />
    <script src="AjaxServer_FINIQ_frmGroup_Definition.js" type="text/javascript"></script>
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    </asp:ScriptManagerProxy>
    <script src="../FinIQJS/SortFilter_Grid.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            try {
                Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);

                function EndRequestHandler(sender, args) {
                    if (args.get_error() != undefined) {
                        //    alert(args.get_error().message.substr(args.get_error().name.length + 2));
                        args.set_errorHandled(true);
                    }
                }
            } catch (error) { console.log(error.message); }
        });

        //Added by Tejaswini On 1 Feb 2019 to restrict . for Template Code and Template Name
        function isKeyDot(evt) {
            var keycode = evt.charCode || evt.keyCode;
            if (keycode == 46) {
                return false;
            }
        }
        //END by Tejaswini

    </script>

    <%-- Confirmation Box --19-09-2019--%>

    <script type="text/javascript">
        String.Format = function () {
            var s = arguments[0];
            for (var i = 0; i < arguments.length - 1; i++) {
                var reg = new RegExp("\\{" + i + "\\}", "gm");
                s = s.replace(reg, arguments[i + 1]);
            }
            return s;
        }
        var dialogConfirmed = false;
        function ViewDialogDuplicate(obj, title, dialogText) {
            if ($("#pageName").html() != null) {
                // title = "View - " + $("#pageName").html();
            }
            // alert("hi " + title + "" + obj);

            if (!dialogConfirmed) {
                //   $('html').append(String.Format("<div id='dialog' title='{0}'><p style='float:left;'><span class='ui-icon ui-icon-alert' style='float:left; margin:0 5px 20px 0;'></span>{1}</p></div>", title, dialogText));
                $('html').append(String.Format("<div id='dialog' title='{0}'><div class='infoConfirmationBox' style='float:left; height:22px !important; width:22px !important; margin: 13px 15px 20px 10px;'></div><p> " + dialogText + " </p></div>", title));

                $('#dialog').dialog
                    ({
                        height: 180,
                        width: 350,
                        modal: true,
                        resizable: false,
                        draggable: true,
                        close: function (event, ui) { $('html').find('#dialog').remove(); },
                        buttons:
                        {
                            'Yes': function () {
                                $("#ctl00_MainContent_btnConfirmation").click();
                                $(this).dialog('close');

                            },
                            'No': function () {
                                $(this).dialog('close');
                                $('html').find("#dialog").remove();
                                return false;
                            }
                        }
                    });
            }

            return dialogConfirmed;

            $(".ui-widget-overlay").height($("body").height());
        }
    </script>

    <style type="text/css">
        .Grid {
            table-layout: fixed;
        }

            .Grid th, .Grid td {
                word-wrap: break-word;
            }

        /*.OuterContainer
        {
            width:1880px;
            height:870px;		
        }*/
        /*.TopContainer
        {
            width:1880px;
            height:65px;
            border-color:gray;
			border-style:solid;
			border-width:1px;
			 margin-left:4px;
        }*/
        /*.topTable
        {
            width:100%;
        }*/

        /*.MiddleContainer
        {
            border-color:gray;
			border-style:solid;
			border-width:1px;
            width:1880px;
            height:790px;
            margin-top:4px;
            margin-left:4px;
        }*/
        .CheckboxListCore_Field_VisibilityPanel {
            width: 150px;
            border-bottom-width: thin;
        }

        .CheckboxListHedging_TypePanel {
            width: 190px;
            border-bottom-width: thin;
        }
        /*.button {
           Width:120px;
           font: normal 13px verdana !important; 
           height:30px !important;           
           border:solid 1px #CCCCCC !important;
           border-collapse:collapse !important;        
           color:#000000 !important;      
           background-color:#F2F2F3 !important;
           margin-left : 6px;
           margin-top : 6px;
           margin-bottom : 6px;
       }
     
        .Applybutton {
           Width:100px;
           font: normal 13px verdana !important; 
           height:30px !important;           
           border:solid 1px #CCCCCC !important;
           border-collapse:collapse !important;        
           color:black !important;      
           background-color:#F2F2F3 !important;
           margin-left : 6px;
           margin-top : 6px;
           margin-bottom : 6px;
       }*/

        .Enabled-button {
            width: 90px;
            /*  margin-left: 5px;*/
        }

        .tablespace {
            margin-top: 10px;
        }

        /*.lblDisp
        {
            text-align:left;    
            height:20px;
        }*/

        .panel {
            top: 250px;
            left: 580px;
            position: absolute;
            display: none;
        }

        .displayNone {
            display: none;
        }

        .panelContainer {
            /*background-color: #CCCCCC;*/
            background-color: whitesmoke;
        }

        /*.FixedHeader {
            position: absolute;
        }*/

        /*  .Grid td
        {
            white-space:nowrap;
        }*/

        /*.HighlightRow span
        {
            background-color:lightblue;
        }*/

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

        /*.Grid th {
           border: solid 1px #dddddd;
           background-color: #ededed !important;
        }*/

        .topTable {
            /*margin-left: 10px;
            margin-top: 10px;
            margin-bottom: 20px;*/
        }

        .MiddleContainer {
            margin-left: 10px;
        }

        /*.Grid td {
            white-space:normal;
        }*/
        .Gridview {
            table-layout: fixed;
            /*width:100%;*/
        }
        /*.ctl00_MainContent_gvTemplateMaster a, .Grid a:link {
            color: #3B66D6;
        }*/
        .paddingLarge {
            padding-left: 20px;
        }

        .paddingSmall {
            padding-left: 10px;
        }

        .width_Name {
            width: 95px;
        }

        .width_txtName {
            width: 320px;
        }

        .EditColWidthPayoff {
            min-width: 100px !important;
            max-width: 500px !important;
        }

        .EditColWidthDynamicHedgingGroupingKey {
            min-width: 100px !important;
            max-width: 500px !important;
        }

        .DeleteContainer {
            padding: 10px 10px 10px 10px;
            margin-left: 574.5px;
            margin-top: 181.5px;
            display: none;
            border-radius: 10px;
            width: 280px;
            height: 100px;
            position: absolute;
            box-shadow: 3px 3px 4px #666;
            border: solid 1px #ddd;
            border-collapse: collapse;
        }

        /*Added by TejaswiniB 09-Feb-2021*/
        .width_4_char{  
                    width: 4ch;
            max-width: 4ch;
            min-width: 4ch;
        }
		/*Added by Bhagyashri B 03-01-2020*/
        .width_8_char {
            width: 8ch;
            max-width: 8ch;
            min-width: 8ch;
        }

        .width_64_char {
            width: 64ch;
            max-width: 64ch !important;
            min-width: 64ch;
        }
        .width_128_char {
            width: 128ch;
            max-width: 128ch !important;
            min-width: 32ch;
        }

        .width_32_char {
            width: 32ch;
            max-width: 32ch;
            min-width: 32ch;
        }

        .width_24_char {
            width: 24ch;
            max-width: 32ch;
            min-width: 24ch;
        }

        .width_16_char {
            width: 16ch;
            max-width: 16ch;
            min-width: 16ch;
        }

        /*Added to hide Beneficiary column by Bhagyashri B 10-01-2020*/
        .visibleFalse {
            display: none;
        }
        /*End By bhagyashri B*/

        .GridHeader {
            background-color: #ededed !important;
        }

        /*Added by Bhagyashri B 27-01-2020 BNPINT-295*/
        .showToggle {
            background-image: url("../App_Resources/Embedded_Actions.png");
        }

        .hideToggle, .showToggle, .EnableToggle, .DisableToggle {
            width: 196px;  /*Changed by Rohit T. 12-May-2022*/
            height: 28px;  /*Changed by Rohit T. 12-May-2022*/
            border: none 0px #FFF !important;
            color: #FFF !important;
            outline: 0 !important;
            background-color: #FFFFFF;
            background-repeat: no-repeat;
            background-size: contain;
        }

        .hideToggle {
            background-image: url("../App_Resources/Regular_Action.png");
        }
        /*End by Bhagyashri B*/
    </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">
        <ContentTemplate>
            <asp:HiddenField ID="mode" runat="server" Value="UPDATE" />

            <table style="border-spacing: 5px 10px">
                <tr style="">
                    <td>
                        <asp:Label ID="lblName" runat="server" CssClass="lbl" Text="Template"></asp:Label>
                    </td>
                    <td>
                        <asp:Button ID="btnEnter" runat="server" class="displayNone" />
                        <asp:TextBox ID="txtName" runat="server" Style="width: 55ch;" onfocus="this.select();" onmouseup="return false;" onkeydown="return EnterEvent(event)"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="btnGo" runat="server" CssClass="btn" Width="90px" Text="Load" />
                    </td>
                    <td>
                        <asp:Button ID="btnAdd" runat="server" CssClass="btn" Width="90px" Text="Add" Style="margin-right: 2px;" />
                        <%--<asp:Button ID="btnTemplateDelete" runat="server" CssClass="btn" Width="90px" Text="Delete" OnClientClick="return confirm('Do you want to perform this Action ?');" />--%>
                        <asp:Button ID="btnTemplateDelete" autopostback="False" runat="server" CssClass="btn" Width="90px" Text="Delete" Enabled="false" Style="margin-right: 2px;" />
                        <asp:Button ID="btnSave" runat="server" CssClass="btn" Width="90px" Text="Save" Style="margin-right: 2px;" Visible="false" />       <%--Hidden by Bhagyashri B 28-01-2020 BNPINT-296--%>
                        <asp:Button ID="btnExport" runat="server" CssClass="btn" Width="90px" Text="Export" Style="margin-right: 2px;" />
                        <asp:DropDownList ID="ddlShowActiveDeactivated" runat="server" AutoPostBack="true" CssClass="width_16_char">
                            <asp:ListItem Text="All" Value="All"></asp:ListItem>
                            <asp:ListItem Text="Only Active" Value="Active" Selected="True"></asp:ListItem>
                            <asp:ListItem Text="Only Deactivated" Value="Deactivated"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td> <%--Changes done by TejaswiniB on 20-May-2021--%>
                        <asp:Button runat="server" ID="btnEmbedded" Visible="True" Text="" CssClass="hideToggle" />  
                        <asp:Button runat="server" ID="btnRegular" Visible="False" Text="" CssClass="showToggle" />
                    </td>
                    <td>
                        <asp:TextBox ID="txtRowsPerPage" Text="99" AutoPostBack="true" CausesValidation="true" runat="server" onfocus="this.select();" onmouseup="return false;" MaxLength="3" Style="width: 5ch; text-align: right;" CssClass="txt" onkeypress="return isNumberKey(event)"></asp:TextBox>
                    </td>
                    <td>
                        <asp:Label ID="Label2" runat="server">Records Per Page</asp:Label>
                    </td>

                    <td style="padding-left: 10px;">
                        <asp:Label ID="lblTotal" runat="server" CssClass="lbl"></asp:Label>
                    </td>
                    <td style="padding-left: 10px;padding-bottom: 5px;">
                         <asp:CheckBox ID="chk_ShowColumns" runat="server" AutoPostBack="true" ></asp:CheckBox>
                        <asp:Label ID="lblShowColumns" runat="server" CssClass="lbl" Text="Show hidden columns"></asp:Label>
                    </td>
                    <%--  <td style="padding-left: 25px;">
                              <asp:CheckBox ID="chkColumnVisibility" runat="server" AutoPostBack="true" OnCheckedChanged="SetColumnVisibility"></asp:CheckBox>
                            <asp:Label ID="lblColumnVisibility" text="Show Additional Columns" runat="server" CssClass="lbl"></asp:Label>
                    </td>--%>
                    <td colspan="5">
                        <asp:Label ID="lblError" runat="server" Style="padding-left: 25px;" CssClass="lblError" Width="250px"></asp:Label>
                    </td>
                </tr>
            </table>

            <div id="div_lblcode" class="DeleteContainer" runat="server" autopostback="False" visible="true">
                <table>
                    <tr>
                        <td colspan="2" style="padding-bottom: 40px;">
                            <asp:Label ID="Label1" runat="server" Text="Do you want to perform this Action ?" Style="padding-left: 15px; font-size: 13px;" Width="250px"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="padding-left: 25px">
                            <asp:Button ID="btnOk" runat="server" CssClass="btn" Width="90px" Text="OK" OnClientClick=" return true;" />
                        </td>
                        <td>
                            <asp:Button ID="Button6" runat="server" CssClass="btn" Width="90px" Text="Cancel" />
                        </td>
                    </tr>
                </table>
            </div>
            <%--   <asp:UpdatePanel ID="UpdatePanel1" runat="server" class="PanelPad">
        <ContentTemplate>--%>
            <div runat="server" id="MiddleContainer">
                <table class="tablespace">
                    <tr>
                        <td>
                            <asp:GridView ID="gvTemplateMaster" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                                BorderStyle="Solid" BorderWidth="1px" CellPadding="1" CssClass="Grid" AllowPaging="true" PageSize="15" ShowHeaderWhenEmpty="true" RowHeadersWidthSizeMode="DisableResizing;">
                                <SelectedRowStyle CssClass="GridItemSelect" />
                                <RowStyle CssClass="GridItem" />
                                <HeaderStyle CssClass="GridHeader" />
                                <FooterStyle CssClass="GridFooter" />
                                <PagerStyle CssClass="GridPager" />
                                <PagerSettings Mode="NumericFirstLast"
                                    FirstPageText="First"
                                    LastPageText="Last"
                                    Position="Bottom" />
                                <%-- <asp:GridView ID="gvTemplateMaster" runat="server" AllowSorting="True" AutoGenerateColumns="False" BorderStyle="None" BorderWidth="0px" CellPadding="3" PageSize="15" PagerStyle-Height="32px"
                                AllowPaging="true" CssClass="Grid Gridview" ShowHeaderWhenEmpty="true" RowHeadersWidthSizeMode="DisableResizing;" SelectedRowStyle-Wrap="true" HeaderStyle-CssClass="GridHeaderTitle">
                      
                                <SelectedRowStyle CssClass="GridItemSelect wid" BackColor="#f7f7f7" />
                                <RowStyle CssClass="GridItem" />
                                <HeaderStyle CssClass="GridHeader" />
                                <FooterStyle CssClass="GridFooter" />
                                <PagerStyle CssClass="GridPager" />

                                <PagerSettings Mode="NumericFirstLast"
                                    FirstPageText="First"
                                    LastPageText="Last"
                                    Position="Bottom" />--%>

                                <EmptyDataTemplate>
                                    <asp:Label ID="lblqueuedatagrid" runat="server" Text="No data found." class="lbl"></asp:Label>
                                </EmptyDataTemplate>

                                <Columns>

                                    <asp:TemplateField>
                                        <ItemStyle CssClass="width_4_char" HorizontalAlign="Center" />
                                        <HeaderStyle CssClass="width_4_char" />
                                        <HeaderTemplate>
                                            <asp:CheckBox ID="chkAll" runat="server" AutoPostBack="true" onclick="checkAll();" />
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkRow" runat="server" AutoPostBack="true" OnCheckedChanged="CountCheckedRows" onclick="checkChanged(this);"></asp:CheckBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:CommandField ButtonType="Link" ShowEditButton="true" EditText="Edit" UpdateText="Update">
                                        <HeaderStyle CssClass="width_16_char" />
                                        <ItemStyle Wrap="true" CssClass="width_16_char" HorizontalAlign="center" />
                                    </asp:CommandField>

                                    <asp:TemplateField HeaderText="ID" Visible="True">
                                        <HeaderStyle CssClass="width_8_char" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="Center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblTemplate_Id" CssClass="width_8_char" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Template_Id").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtTemplate_Id" Enabled="false" runat="server" CssClass="width_8_char txt" Style="text-align: right" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Template_Id").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Code">
                                        <HeaderStyle CssClass="width_32_char" />
                                        <ItemStyle Wrap="true" HorizontalAlign="left" CssClass="width_32_char" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblCode" CssClass="width_32_char" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Code").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtCode" runat="server" onfocus="this.select();" onmouseup="return false;" OnTextChanged="check_validationCode" CssClass="txt width_32_char txtCode" onkeypress="return isKeyDot(event)" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Code").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Name">
                                        <HeaderStyle Wrap="False" CssClass="width_32_char"></HeaderStyle>
                                        <ItemStyle HorizontalAlign="left" Wrap="true" CssClass="width_32_char" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblGridName" CssClass="width_32_char" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Name").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtGridName" runat="server" onfocus="this.select();" onmouseup="return false;" OnTextChanged="check_validationName" onkeypress="return isKeyDot(event)" CssClass="txt width_32_char" Text='<%# (DataBinder.Eval(Container, "DataItem.Name").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Scheme">
                                        <HeaderStyle Wrap="False" CssClass="width_16_char"></HeaderStyle>
                                        <ItemStyle HorizontalAlign="left" Wrap="true" CssClass="width_16_char" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblScheme_Code" runat="server" CssClass="width_16_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Scheme_Name").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlScheme_Code" Width="150px" runat="server" AutoPostBack="False" CssClass="ddl width_16_char">
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Asset Class">
                                        <HeaderStyle CssClass="width_8_char" Wrap="true" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblAsset_class" CssClass="width_8_char" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Asset_Class").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlAssetClass" CssClass="ddl width_8_char" runat="server" AutoPostBack="false">
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Template Prefix">
                                        <HeaderStyle CssClass="width_64_char" />
                                        <ItemStyle Wrap="true" CssClass="width_64_char" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblTemplate_Prefix" CssClass="width_64_char" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Template_Prefix").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtTemplate_Prefix" runat="server" TextMode="MultiLine" onfocus="this.select();" onmouseup="return false;" CssClass="txt width_64_char" Text='<%# (DataBinder.Eval(Container, "DataItem.Template_Prefix").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <%--Column hidden by Bhagyashri B 10-01-2020 --Hemlata Mam--%>
                                    <asp:TemplateField HeaderText="Beneficiary">
                                        <HeaderStyle CssClass="visibleFalse" />
                                        <ItemStyle Wrap="true" CssClass="visibleFalse" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblBeneficiary" CssClass="visibleFalse" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Beneficiary").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtBeneficiary" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="visibleFalse" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Beneficiary").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Hedging Type">
                                        <HeaderStyle CssClass="width_16_char" />
                                        <ItemStyle Wrap="true" HorizontalAlign="left" CssClass="width_16_char" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblHedging_Type" runat="server" CssClass="width_16_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.HedgingType").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:Label ID="lblInner_Hedging_Type" CssClass="width_16_char" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.HedgingType").ToString)%>' Visible="true" />
                                            <%-- <asp:Panel ID="pnlHedging_Type" runat="server">
                                                                         
                                                                <fieldset   class="CheckboxListPanel" title="Hedging Type">
                                                                <legend class="lblHedging_TypeLegend" > <asp:Button ID="Button1" class="btnClose" cssclass="btn" runat="server" Text="X" Height="17px" Width="15px" CommandName="Close" OnCommand="btnHedging_TypeClose_Click"  /></legend>
                 
                                                                <asp:CheckBoxList ID="chklistHedging_Type" runat="server">
                                                                    <asp:ListItem Value="Manual">Hidden</asp:ListItem>
                                                                    <asp:ListItem Value="Back to Back">Back to Back</asp:ListItem>
                                                                    <asp:ListItem Value="Dynamic">Dynamic</asp:ListItem>
                                                                    <asp:ListItem Value="Order">Order</asp:ListItem>
                                                                    <asp:ListItem Value="Pooling">Pooling</asp:ListItem>
                                                                    <asp:ListItem Value="Product">Product</asp:ListItem>
                                                                    <asp:ListItem Value="RFQ">RFQ</asp:ListItem>
                                                                    <asp:ListItem Value="Market">Market</asp:ListItem>
                                                                    <asp:ListItem Value="Minimised Mode">Minimised Mode</asp:ListItem>
                                                                    <asp:ListItem Value="UDF">UDF</asp:ListItem>
                                                                </asp:CheckBoxList>
                                                                <asp:Button ID="Button2" class="button" Text="Apply" CommandName="Apply" OnCommand="BtnHedging_TypeApply_Click" runat="server"/>
                                                            </fieldset>
                                                </asp:Panel>--%>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <%--<Schema (AppUserName)>--%>
                                    <asp:TemplateField HeaderText="Schema" Visible="false"><%--AppUserName changed to Schema by Bhagyashri B 08-01-2020 --Hemlata Mam--%>
                                        <HeaderStyle CssClass="width_16_char" Wrap="true" />
                                        <ItemStyle Wrap="true" CssClass="width_16_char" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblAppUserName" runat="server" CssClass="width_16_char" Text='<%#   Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.TM_AppUserName").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlAppUserName" runat="server" CssClass="ddl width_16_char" AutoPostBack="false" Text='<%#   Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.TM_AppUserName").ToString)%>'>
                                                <asp:ListItem Value="dbo"></asp:ListItem>
                                                <asp:ListItem Value="FinIQApp"></asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                     <asp:TemplateField HeaderText="Schedule Logic">
                                        <HeaderStyle CssClass="width_8_char" Wrap="true" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblScheduleLogic" CssClass="width_8_char" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ScheduleLogic").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlScheduleLogic" runat="server" CssClass="ddl width_8_char" AutoPostBack="false" SelectedValue='<%# DataBinder.Eval(Container, "DataItem.ScheduleLogic")%>'>
                                                <asp:ListItem Value=""></asp:ListItem>
                                                <asp:ListItem Value="Both">Both</asp:ListItem>
                                                <asp:ListItem Value="New">New</asp:ListItem>
                                                <asp:ListItem Value="Old">Old</asp:ListItem>
                                               </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>
                                    <%--<Fire&forget>--%>
                                    <asp:TemplateField HeaderText="Schedule Save Fire and Forget" Visible="false">
                                        <HeaderStyle CssClass="width_8_char" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="Center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblFireForget" runat="server" CssClass="width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AllowScheduleFireAndForget").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlFireForget" runat="server" CssClass="ddl width_8_char" AutoPostBack="false" SelectedValue='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AllowScheduleFireAndForget").ToString)%>'>
                                                <asp:ListItem Value=""></asp:ListItem>
                                                <asp:ListItem Value="Y">Y</asp:ListItem>
                                                <asp:ListItem Value="N">N</asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <%--<USerfacing>--%>
                                    <asp:TemplateField HeaderText="Follow UserFacing Sequence in Schedule" Visible="false">
                                        <HeaderStyle CssClass="width_8_char" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="Center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblSchUserFacSeq" runat="server" CssClass="width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FollowUserFacingSeqinSchedule").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlSchUserFacSeq" runat="server" CssClass="ddl width_8_char" AutoPostBack="false" SelectedValue='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FollowUserFacingSeqinSchedule").ToString)%>'>
                                                <asp:ListItem Value=""></asp:ListItem>
                                                <asp:ListItem Value="Y">Y</asp:ListItem>
                                                <asp:ListItem Value="N">N</asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>
                                   <%--HemlataA on 28-Apr-2020--%>
                                    <asp:TemplateField HeaderText="Blank Notional YN" Visible="false">
                                        <HeaderStyle CssClass="width_8_char" Wrap="true" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="Center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblBlankNotional" runat="server" CssClass="width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BlankNotionalYN").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlBlankNotional" runat="server" CssClass="ddl width_8_char" AutoPostBack="false">
                                            <asp:ListItem Value="Y"></asp:ListItem>
                                                <asp:ListItem Value="N"></asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <%--<UCPOpenWFLAfterDealSave>--%>
                                    <asp:TemplateField HeaderText="Open WFL After Deal Save" Visible="false">
                                        <HeaderStyle CssClass="width_8_char" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="Center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblOpenWFL" runat="server" CssClass="width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UCPOpenWFLAfterDealSave").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlOpenWFL" runat="server" CssClass="ddl width_8_char" AutoPostBack="false" SelectedValue='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UCPOpenWFLAfterDealSave").ToString)%>'>
                                                <asp:ListItem Value=""></asp:ListItem>
                                                <asp:ListItem Value="Y">Y</asp:ListItem>
                                                <asp:ListItem Value="N">N</asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <%--< Basket_Size>--%>
                                    <asp:TemplateField HeaderText="Basket Size" Visible="false">
                                        <HeaderStyle CssClass="width_8_char" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="Center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblUCP_Basketsize" runat="server" CssClass="width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Basket_size").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlUCP_Basketsize" runat="server" CssClass="ddl width_8_char" AutoPostBack="false" SelectedValue='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Basket_size").ToString)%>'>
                                                <asp:ListItem Value=""> </asp:ListItem>
                                                <asp:ListItem Value="N">N</asp:ListItem>
                                                <asp:ListItem Value="7">7</asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <%--Renamed by Bhagyashri B 10-01-2020 [Market Leg] --> [Market Leg Display Name] --Hemlata Mam--%>
                                    <asp:TemplateField HeaderText="Market Leg Display Name" Visible="false">
                                        <HeaderStyle CssClass="width_8_char" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblMarketLeg" runat="server" CssClass="width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MarketLeg").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtMarketLeg" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MarketLeg").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <%--Renamed by Bhagyashri B 10-01-2020 [Client Leg] --> [Client Leg Display Name] --Hemlata Mam--%>
                                    <asp:TemplateField HeaderText="Client Leg Display Name" Visible="false" >
                                        <HeaderStyle CssClass="width_8_char" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblClientLeg" runat="server" CssClass="width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ClientLeg").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtClientLeg" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ClientLeg").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Show Client Grid" Visible="false">
                                        <HeaderStyle CssClass="width_8_char" Wrap="true" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblShowClientGrid" runat="server" CssClass="width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ShowClientGrid").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlShowClientGrid" runat="server" CssClass="ddl width_8_char" SelectedValue='<%# DataBinder.Eval(Container, "DataItem.ShowClientGrid")%>' AutoPostBack="false">
                                                <asp:ListItem Value=""></asp:ListItem>
                                                <asp:ListItem  Value="Y"></asp:ListItem>
                                                <asp:ListItem Value="N"></asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Client Only"  Visible="false">
                                        <HeaderStyle CssClass="width_8_char" Wrap="true" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblClient_Only" runat="server" CssClass="width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Client_Only").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlClient_Only" runat="server" CssClass="ddl width_8_char" SelectedValue='<%# DataBinder.Eval(Container, "DataItem.Client_Only")%>' AutoPostBack="false">
                                                <asp:ListItem Value=""></asp:ListItem>
                                                <asp:ListItem Value="Y"></asp:ListItem>
                                                <asp:ListItem Value="N"></asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <%--Renamed by Bhagyashri B 10-01-2020 [Market Buy] --> [Market Buy Display Name] --Hemlata Mam--%>
                                    <asp:TemplateField HeaderText="Market Buy Display Name" Visible="false">
                                        <HeaderStyle CssClass="width_8_char" Wrap="true" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="Center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblMarketBuy" runat="server" CssClass="width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MarketBuy").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtMarketBuy" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MarketBuy").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <%--Renamed by Bhagyashri B 10-01-2020 [Market Sell] --> [Market Sell Display Name] --Hemlata Mam--%>
                                    <asp:TemplateField HeaderText="Market Sell Display Name" Visible="false">
                                        <HeaderStyle CssClass="width_8_char" Wrap="true" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="Center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblMarketSell" runat="server" CssClass="width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MarketSell").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtMarketSell" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MarketSell").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <%--Renamed by Bhagyashri B 10-01-2020 [Client Buy] --> [Client Buy Display Name] --Hemlata Mam--%>
                                    <asp:TemplateField HeaderText="Client Buy Display Name" Visible="false">
                                        <HeaderStyle CssClass="width_8_char" Wrap="true" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="Center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblClientBuy" runat="server" CssClass="width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ClientBuy").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtClientBuy" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ClientBuy").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <%--Renamed by Bhagyashri B 10-01-2020 [Client Sell] --> [Client Sell Display Name] --Hemlata Mam--%>
                                    <asp:TemplateField HeaderText="Client Sell Display Name" Visible="false">
                                        <HeaderStyle CssClass="width_8_char" Wrap="true" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="Center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblClientSell" runat="server" CssClass="width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ClientSell").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtClientSell" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ClientSell").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Hide Market Leg" Visible="false">
                                        <HeaderStyle CssClass="width_8_char" Wrap="true" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblHideMarket_LegYN" CssClass="width_8_char" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.TM_HideMarketLeg").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlHideMarket_LegYN" runat="server" CssClass="ddl width_8_char" AutoPostBack="false">
                                                <asp:ListItem Value=""></asp:ListItem>
                                                <asp:ListItem Value="Y"></asp:ListItem>
                                                <asp:ListItem Value="N"></asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Product Finder" Visible="false">
                                        <HeaderStyle Wrap="true" />
                                        <ItemStyle Wrap="true" HorizontalAlign="center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblProduct_FinderYN" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Product_FinderYN").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlProductFinderYN" runat="server" AutoPostBack="false">
                                                <asp:ListItem Value=""></asp:ListItem>
                                                <asp:ListItem Value="Y"></asp:ListItem>
                                                <asp:ListItem Value="N"></asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Document Termsheet" Visible="false">
                                        <HeaderStyle CssClass="width_8_char" Wrap="true" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblDocument_Termsheet" runat="server" CssClass="width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.IsDocGenConfoWithTermsheet").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlDocument_Termsheet" runat="server" CssClass="ddl width_8_char" AutoPostBack="false">
                                                <asp:ListItem Value=""></asp:ListItem>
                                                <asp:ListItem Value="Y"></asp:ListItem>
                                                <asp:ListItem Value="N"></asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Collateral/ Exposure" Visible="False">
                                        <HeaderStyle CssClass="width_16_char" Wrap="true" />
                                        <ItemStyle Wrap="true" CssClass="width_16_char" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblUCP_collaterExposure" CssClass="width_16_char" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UCP_collaterExposure").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlUCP_collaterExposure" runat="server" CssClass="ddl width_16_char" AutoPostBack="false" onchange="setCollateralType(this);" SelectedValue='<%# DataBinder.Eval(Container, "DataItem.UCP_collaterExposure")%>'>
                                                <asp:ListItem Value=""></asp:ListItem>
                                                <asp:ListItem Value="Both">Both</asp:ListItem>
                                                <asp:ListItem  Value="Collateral">Collateral</asp:ListItem>
                                                <asp:ListItem Value="Exposure">Exposure</asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Collateral/ Exposure Type" Visible="False">
                                        <HeaderStyle CssClass="width_8_char" Wrap="true" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblUCP_collaterExposureType" CssClass="width_8_char" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UCP_collaterExposureType").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtUCP_collaterExposureType" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="colExpo_type txt width_8_char" Text=''></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Payoff Prefix" Visible="false" ItemStyle-CssClass="EditColWidthPayoff" HeaderStyle-CssClass="EditColWidthPayoff">
                                        <HeaderStyle CssClass="width_64_char" Wrap="true" />
                                        <ItemStyle Wrap="true" CssClass="width_64_char" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblPayoff_SQL" runat="server" CssClass="width_64_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Payoff_SQL").ToString)%>' />
                                            <asp:LinkButton ID="lnkbtnForLongPrefix" runat="server" CssClass="width_64_char" Text="Click to see Payoff Prefix" Visible="false" OnClientClick="displayPayoffPrefixPanel(); return false;"></asp:LinkButton>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtPayoff_SQL" runat="server" TextMode="MultiLine" onfocus="this.select();" onmouseup="return false;" CssClass="txt width_64_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Payoff_SQL").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Payoff Prefix 2" Visible="false" HeaderStyle-CssClass="EditColWidthPayoff" ItemStyle-CssClass="EditColWidthPayoff">
                                        <HeaderStyle CssClass="width_64_char" Wrap="false" />
                                        <ItemStyle Wrap="true" CssClass="width_64_char" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblPayoff_SQL2" runat="server" CssClass="width_64_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Payoff_SQL2").ToString)%>' />
                                            <asp:LinkButton ID="lnkbtnForLongPrefix2" runat="server" CssClass="width_64_char" Text="Click to see Payoff Prefix 2" Visible="false" OnClientClick="displayPayoffPrefix2Panel(); return false;"></asp:LinkButton>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtPayoff_SQL2" runat="server" TextMode="MultiLine" onfocus="this.select();" onmouseup="return false;" CssClass="txt width_64_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Payoff_SQL2").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <%--   <asp:TemplateField HeaderText="Visual" ControlStyle-Width="80">
                                                  <HeaderStyle Width="80"  />
                                            <ItemStyle Wrap="true" Width="80"  horizontalalign="left"/>  
                                                <ItemTemplate>
                                                    <asp:Label ID="lblVisual"  runat="server" Text='' />
                                            </ItemTemplate>
                                                <EditItemTemplate>
                                                  <%--  <asp:FileUpload ID="fileupload" type="file" size="55" name="clientfile" runat="server"  ToolTip="Choose File"/>--%>
                                    <%--   <asp:TextBox ID="txtVisual" runat="server"  CssClass="txt" ></asp:TextBox>--%>
                                    <%--   <asp:Label ID="lblInnerVisual"  runat="server" Text='' Visible="false" /> 
                                                    <asp:FileUpload ID="FileUpload1" runat="server" EnableViewState="true" />
                                                    <asp:Button ID="BtnVisual" class="button" Text="Upload"  OnCommand="BtnVisual_Click" runat="server"/>--%>
                                    <%--</EditItemTemplate>
                                            </asp:TemplateField>--%>

                                    <asp:TemplateField HeaderText="Max Client Legs"  Visible="false">
                                        <HeaderStyle CssClass="width_8_char" Wrap="true" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblMax_Client_Legs" runat="server" CssClass="width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Max_Client_Legs").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtMax_Client_Legs" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Max_Client_Legs").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <%--Renamed by Bhagyashri B 10-01-2020 [Save Child] --> [Recipe on Product Save] --Hemlata Mam--%>
                                    <asp:TemplateField HeaderText="Recipe on Product save" Visible="false">
                                        <HeaderStyle CssClass="width_8_char" Wrap="true" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblSaveChild_YN" CssClass="width_8_char" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.SaveChild_YN").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlSaveChild_YN" runat="server" CssClass="ddl width_8_char" AutoPostBack="false" SelectedValue='<%# DataBinder.Eval(Container, "DataItem.SaveChild_YN")%>'>
                                                <asp:ListItem Value=""></asp:ListItem>
                                                <asp:ListItem Value="Y">Y</asp:ListItem>
                                                <asp:ListItem Value="N">N</asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Control Type" Visible="false">
                                        <HeaderStyle CssClass="width_8_char" Wrap="true" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="Center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblControl_type" runat="server" CssClass="width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Control_type").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlControl_type" runat="server" CssClass="ddl width_8_char" SelectedValue='<%# DataBinder.Eval(Container, "DataItem.Control_type")%>' AutoPostBack="false">
                                                <asp:ListItem Value=""></asp:ListItem>
                                                <asp:ListItem Value="UCP">UCP</asp:ListItem>
                                                <asp:ListItem Value="UDF">UDF</asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="UCP Schema" Visible="false">
                                        <HeaderStyle Wrap="true" />
                                        <ItemStyle Wrap="true" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblUCP_Schema" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UCP_Schema").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlUCP_Schema" runat="server" CssClass="ddl" AutoPostBack="false" SelectedValue='<%# DataBinder.Eval(Container, "DataItem.UCP_Schema")%>'>
                                                <asp:ListItem Value=""></asp:ListItem>
                                                <asp:ListItem Value="FinIQApp">FinIQApp</asp:ListItem>
                                                <asp:ListItem Value="Native">Native</asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="UCP DBName" Visible="false">
                                        <ItemStyle Wrap="true" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblUCP_DbName" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UCP_DbName").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlUCP_DbName" runat="server" CssClass="ddl" AutoPostBack="false" SelectedValue='<%# DataBinder.Eval(Container, "DataItem.UCP_DbName")%>'>
                                                <asp:ListItem Value=""></asp:ListItem>
                                                <asp:ListItem Value="Customer">Customer</asp:ListItem>
                                                <asp:ListItem Value="DCD">DCD</asp:ListItem>
                                                <asp:ListItem Value="Definition">Definition</asp:ListItem>
                                                <asp:ListItem Value="FinIQ_Common">FinIQ_Common</asp:ListItem>
                                                <asp:ListItem Value="Rates">Rates</asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="UCP Table Name" Visible="false">
                                        <ItemStyle Wrap="true" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblUCP_TableName" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UCP_TableName").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlUCP_TableName" runat="server" CssClass="ddl" AutoPostBack="false">
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="What If Prefix"  Visible="false" >
                                        <HeaderStyle CssClass="width_64_char" Wrap="true" />
                                        <ItemStyle Wrap="true" CssClass="width_64_char" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblWhat_If_Prefix" runat="server" CssClass="width_64_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.What_If_Prefix").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtWhat_If_Prefix" runat="server" TextMode="MultiLine" onfocus="this.select();" onmouseup="return false;" CssClass="txt width_64_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.What_If_Prefix").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Control Sequence">
                                        <HeaderStyle CssClass="width_16_char" Wrap="true" />
                                        <ItemStyle Wrap="true" CssClass="width_32_char" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblControl_Sequence" runat="server" CssClass="width_32_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.DealEntryControlSequence").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtControl_Sequence" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt width_32_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.DealEntryControlSequence").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="DealEntryControlsVisibility">
                                        <HeaderStyle Wrap="true" CssClass="width_64_char" />
                                        <ItemStyle Wrap="true" CssClass="width_64_char" />
                                        <ItemTemplate>
                                            <asp:Label ID="lbl_DealEntryControlsVisibility" CssClass="width_64_char" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.DealEntryControlsVisibility").ToString)%>'></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:Label ID="lbl_DealEntryControlsVisibility" runat="server" Visible="false" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.DealEntryControlsVisibility").ToString)%>'></asp:Label>
                                            <asp:CheckBoxList ID="chkDealEntryControlsVisibility" runat="server" RepeatDirection="Horizontal">
                                                <asp:ListItem Text="Custom Tab" Selected="True"></asp:ListItem>
                                                <asp:ListItem Text="UDF Fields" Selected="True"></asp:ListItem>
                                                <asp:ListItem Text="Customer Grid" Selected="True"></asp:ListItem>
                                                <asp:ListItem Text="Static Fields" Selected="True"></asp:ListItem>
                                                <asp:ListItem Text="Workflow Graph" Selected="True"></asp:ListItem>
                                            </asp:CheckBoxList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Settlement Currency" Visible="false">
                                        <HeaderStyle Wrap="true" />
                                        <ItemStyle Wrap="true" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblSettlementCurrency" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.SettlementCurrency").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtSettlementCurrency" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.SettlementCurrency").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Fixing Currency" Visible="false">
                                        <HeaderStyle Wrap="true" />
                                        <ItemStyle Wrap="true" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblFixingCurrency" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FixingCurrency").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtFixingCurrency" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FixingCurrency").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Intermediate Currency" Visible="false">
                                        <HeaderStyle Wrap="true" />
                                        <ItemStyle Wrap="true" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblIntermediateCurrency" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.IntermediateCurrency").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtIntermediateCurrency" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.IntermediateCurrency").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Template Mapping" Visible="false">
                                        <HeaderStyle Wrap="true" />
                                        <ItemStyle Wrap="true" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblTemplate_Mapping" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Template_Mapping").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtTemplate_Mapping" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Template_Mapping").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Close Out Priority" Visible="false">
                                        <HeaderStyle Wrap="true" />
                                        <ItemStyle Wrap="true" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblClose_Out_Priority" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.CloseoutPriority").ToString)%>'></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlClose_Out_Priority" runat="server" CssClass="ddl" AutoPostBack="false">
                                                <asp:ListItem Value=""></asp:ListItem>
                                                <asp:ListItem Value="Cheapest First"></asp:ListItem>
                                                <asp:ListItem Value="Cheapest Last"></asp:ListItem>
                                                <asp:ListItem Value="FIFO"></asp:ListItem>
                                                <asp:ListItem Value="LIFO"></asp:ListItem>
                                                <asp:ListItem Value="Manual"></asp:ListItem>
                                                <asp:ListItem Value="Pro-rated"></asp:ListItem>
                                            </asp:DropDownList>
                                            <%--<asp:Label ID="lblInner_Close_Out_Priority"  runat="server" Text='' Visible="false" />
                                                    <asp:Panel ID="pnlClose_Out_Priority" runat="server">
                                                                <fieldset   class="CheckboxListPanel" title="Close Out Priority">
                                                                <legend class="lblClose_Out_PriorityLegend" > <asp:Button ID="Button1" class="btnClose" cssclass="btn" runat="server" Text="X" Height="17px" Width="15px" CommandName="Close" OnCommand="btnClose_Out_PriorityClose_Click"  /></legend>
                                                                <asp:CheckBoxList ID="chklistClose_Out_Priority" runat="server">
                                                                    <asp:ListItem Value="Manual">Manual</asp:ListItem>
                                                                    <asp:ListItem Value="LIFO">LIFO</asp:ListItem>
                                                                    <asp:ListItem Value="FIFO">FIFO</asp:ListItem>
                                                                    <asp:ListItem Value="Cheapest First">Cheapest First</asp:ListItem>
                                                                    <asp:ListItem Value="Cheapest Last">Cheapest Last</asp:ListItem>
                                                                    <asp:ListItem Value="Pro-rated">Pro-rated</asp:ListItem>

                                                                </asp:CheckBoxList>
                                                                <asp:Button ID="Button2" class="button" Text="Apply" CommandName="Apply" OnCommand="BtnClose_Out_PriorityApply_Click" runat="server"/>
                                                            </fieldset>
                                                            </asp:Panel>--%>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="PriceList YN" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lblPriceList_YN" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.PriceList_YN").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtPriceList_YN" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.PriceList_YN").ToString)%>'></asp:TextBox>
                                            <%-- <asp:DropDownList ID="ddlPriceList_YN" runat="server" CssClass="ddl" Width="120" AutoPostBack="True" >
                                                    <asp:ListItem Value=""></asp:ListItem>
                                                    <asp:ListItem Value="Y">Y</asp:ListItem>
                                                    <asp:ListItem Value="N">N</asp:ListItem>
                                                </asp:DropDownList>--%>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Price Yield Calc YN" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lblPrice_Yield_Calc_YN" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Price_Yield_Calc_YN").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtPrice_Yield_Calc_YN" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Price_Yield_Calc_YN").ToString)%>'></asp:TextBox>
                                            <%--<asp:DropDownList ID="ddlPrice_Yield_Calc_YN" runat="server" CssClass="ddl" Width="120" AutoPostBack="True"   >
                                                    <asp:ListItem Value=""></asp:ListItem>
                                                    <asp:ListItem Value="Y">Y</asp:ListItem>
                                                    <asp:ListItem Value="N">N</asp:ListItem>
                                                </asp:DropDownList>--%>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="RELN YN" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lblRELN_YN" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RELN_YN").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtRELN_YN" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RELN_YN").ToString)%>'></asp:TextBox>
                                            <%--<asp:DropDownList ID="ddlRELN_YN" runat="server" CssClass="ddl" Width="120" AutoPostBack="True"   >
                                                    <asp:ListItem Value=""></asp:ListItem>
                                                    <asp:ListItem Value="Y">Y</asp:ListItem>
                                                    <asp:ListItem Value="N">N</asp:ListItem>
                                                </asp:DropDownList>--%>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="UDF Insert YN" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lblUDF_Insert_YN" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Misc1").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtUDF_Insert_YN" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Misc1").ToString)%>'></asp:TextBox>
                                            <%--<asp:DropDownList ID="ddlUDF_Insert_YN" runat="server" CssClass="ddl" Width="120" AutoPostBack="True"   >
                                                    <asp:ListItem Value=""></asp:ListItem>
                                                    <asp:ListItem Value="Y">Y</asp:ListItem>
                                                    <asp:ListItem Value="N">N</asp:ListItem>
                                                </asp:DropDownList>--%>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Quanto YN" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lblQuanto_YN" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Misc2").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtQuanto_YN" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Misc2").ToString)%>'></asp:TextBox>
                                            <%-- <asp:DropDownList ID="ddlQuanto_YN" runat="server" CssClass="ddl" Width="120" AutoPostBack="True"   >
                                                    <asp:ListItem Value=""></asp:ListItem>
                                                    <asp:ListItem Value="Y">Y</asp:ListItem>
                                                    <asp:ListItem Value="N">N</asp:ListItem>
                                                </asp:DropDownList>--%>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Open Entity YN" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lblOpenEntityYN" runat="server" Text='' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtOpenEntityYN" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text=''></asp:TextBox>
                                            <%-- <asp:DropDownList ID="ddlOpenEntityYN" runat="server" CssClass="ddl" Width="120" AutoPostBack="True"   >
                                                    <asp:ListItem Value=""></asp:ListItem>
                                                    <asp:ListItem Value="Y">Y</asp:ListItem>
                                                    <asp:ListItem Value="N">N</asp:ListItem>
                                                </asp:DropDownList>--%>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="WIP" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lblWIP" runat="server" Text='' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlWIP" runat="server" CssClass="ddl" AutoPostBack="false">
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Setup YN" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lblSetupYN" runat="server" Text='' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtSetupYN" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text=''></asp:TextBox>
                                            <%-- <asp:DropDownList ID="ddlSetupYN" runat="server" CssClass="ddl" Width="120" AutoPostBack="True"   >
                                                    <asp:ListItem Value=""></asp:ListItem>
                                                    <asp:ListItem Value="Y">Y</asp:ListItem>
                                                    <asp:ListItem Value="N">N</asp:ListItem>
                                                </asp:DropDownList>--%>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Underlying Count" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lblUnderlying_Count" runat="server" Text='' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtUnderlying_Count" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text=''></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Core Field Visibility" ControlStyle-Width="120" Visible="false">
                                        <ItemStyle Wrap="true" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblCore_Field_Visibility" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Alternate_Remark6").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:Label ID="lblInner_Core_Field_Visibility" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Alternate_Remark6").ToString)%>' Visible="false" />
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Buying Denomination" Visible="false">
                                        <HeaderStyle Wrap="true" />
                                        <ItemStyle Wrap="true" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblBuying_denomination" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Buying_denomination").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlBuying_denomination" runat="server" CssClass="ddl" AutoPostBack="false">
                                                <asp:ListItem Value=""></asp:ListItem>
                                                <asp:ListItem Value="Amt1"></asp:ListItem>
                                                <asp:ListItem Value="Amt2"></asp:ListItem>
                                                <asp:ListItem Value="Qty"></asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Selling Denomination" Visible="false">
                                        <HeaderStyle Wrap="true" />
                                        <ItemStyle Wrap="true" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblSelling_denomination" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Selling_denomination").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlSelling_denomination" runat="server" CssClass="ddl" AutoPostBack="false">
                                                <asp:ListItem Value=""></asp:ListItem>
                                                <asp:ListItem Value="Amt1"></asp:ListItem>
                                                <asp:ListItem Value="Amt2"></asp:ListItem>
                                                <asp:ListItem Value="Qty"></asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                  
                                    <asp:TemplateField HeaderText="Series_No_Prefix" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lblSeries_No_Prefix" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Series_No_Prefix").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtSeries_No_Prefix" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Series_No_Prefix").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Alternate_Remark" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lblAlternate_Remark" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Alternate_Remark").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtAlternate_Remark" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Alternate_Remark").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Alternate_Remark1" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lblAlternate_Remark1" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Alternate_Remark1").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtAlternate_Remark1" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Alternate_Remark1").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Dynamic Hedging Grouping Key" ItemStyle-CssClass="EditColWidthDynamicHedgingGroupingKey" HeaderStyle-CssClass="EditColWidthDynamicHedgingGroupingKey" Visible="false">
                                        <HeaderStyle Wrap="true" />
                                        <ItemStyle Wrap="true" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblAlternate_Remark2" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Alternate_Remark2").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtAlternate_Remark2" runat="server" onfocus="this.select();" onmouseup="return false;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Alternate_Remark2").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Alternate_Remark3" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lblAlternate_Remark3" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Alternate_Remark3").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtAlternate_Remark3" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Alternate_Remark3").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Alternate_Remark4" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lblAlternate_Remark4" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Alternate_Remark4").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtAlternate_Remark4" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Alternate_Remark4").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Alternate_Remark5" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lblAlternate_Remark5" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Alternate_Remark5").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtAlternate_Remark5" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Alternate_Remark5").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Alternate_Remark6" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lblAlternate_Remark6" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Alternate_Remark6").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtAlternate_Remark6" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Alternate_Remark6").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Lot_Size_Display_String" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lblLot_Size_Display_String" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Lot_Size_Display_String").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtLot_Size_Display_String" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Lot_Size_Display_String").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Product Display Name" Visible="false">
                                        <ItemStyle Wrap="true" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblProduct_Display_Name" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Product_Display_Name").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtProduct_Display_Name" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Product_Display_Name").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Settlement Bank" Visible="false">
                                        <ItemStyle Wrap="true" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblSettlement_Bank" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Settlement_Bank").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtSettlement_Bank" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Settlement_Bank").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="WFRURL" Visible="false"><%--ControlStyle-Width="110"--%>
                                        <HeaderStyle CssClass="width_8_char" />
                                        <ItemStyle Wrap="true" CssClass="width_8_char" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblWFLURL" runat="server" CssClass="width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WFLURL").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtWFLURL" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt width_8_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WFLURL").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="PRDURL"  Visible="false"><%-- ControlStyle-Width="390px"--%>
                                        <HeaderStyle CssClass="width_32_char" />
                                        <ItemStyle Wrap="true" CssClass="width_32_char" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblPRDURL" runat="server" CssClass="width_32_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.PRDURL").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtPRDURL" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt width_32_char" Text='<%#  (DataBinder.Eval(Container, "DataItem.PRDURL").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="RuleEngine Prefix" Visible="false"><%-- ControlStyle-Width="390px"--%>
                                        <HeaderStyle CssClass="width_64_char" />
                                        <ItemStyle Wrap="true" CssClass="width_64_char" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblRuleEngine_Prefix" runat="server" CssClass="width_64_char" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RuleEngine_Prefix ").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtRuleEngine_Prefix" runat="server" TextMode="MultiLine" onfocus="this.select();" onmouseup="return false;" CssClass="txt width_64_char" Text='<%#  (DataBinder.Eval(Container, "DataItem.RuleEngine_Prefix ").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Account No" ControlStyle-Width="120" Visible="false">
                                        <ItemStyle Wrap="true" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblAccount_No" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Account_No").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtAccount_No" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text='<%#   Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Account_No").ToString)%>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Count RecCount Rec" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lblTemplateCount" runat="server" Text='' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtTemplateCount" runat="server" onfocus="this.select();" onmouseup="return false;" CssClass="txt" Text=''></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Active YN">
                                        <HeaderStyle CssClass="width_8_char" />
                                        <ItemStyle CssClass="width_8_char" HorizontalAlign="Center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblActiveYN" CssClass="lbl width_8_char" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ActiveYN_Flag").ToString)%>'></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="ddlActiveYN" runat="server" CssClass="ddl width_8_char">
                                                <asp:ListItem Value="Y">Y</asp:ListItem>
                                                <asp:ListItem Value="N">N</asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>
                                    <%--Addded by RajeshC on 06-Jun-2021--%>
                                    <asp:TemplateField HeaderText="IncludeSavingTables" Visible="false">
                                        <HeaderStyle Wrap="true" CssClass="width_128_char" />
                                        <ItemStyle Wrap="true" CssClass="width_128_char" />
                                        <ItemTemplate>
                                            <asp:Label ID="lbl_IncludeSavingTables" CssClass="width_128_char" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.IncludeSavingTables").ToString)%>'></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:Label ID="lbl_IncludeSavingTables" runat="server" Visible="false" Style="word-break : break-all; " Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.IncludeSavingTables").ToString)%>'></asp:Label>
                                            <asp:CheckBoxList ID="chkIncludeSavingTables" runat="server"  RepeatDirection="Vertical">
                                                <asp:ListItem Text="Note_MTM_Price" Selected="True"></asp:ListItem>
                                                <%--<asp:ListItem Text="Note_MTM_Price_History" Selected="True"></asp:ListItem>--%>
                                                <asp:ListItem Text="Product_Catalogue_Master" Selected="True"></asp:ListItem>
                                                <asp:ListItem Text="Product_Counterparty_Mapping" Selected="True"></asp:ListItem>
                                                <asp:ListItem Text="Product_RMClass_Mapping" Selected="True"></asp:ListItem>
                                            </asp:CheckBoxList>
                                        </EditItemTemplate>
                                    </asp:TemplateField>

                                </Columns>

                                <%--<PagerStyle Font-Size="9pt" Mode="NumericPages" Visible="False" />--%>
                            </asp:GridView>
                        </td>
                        <td>
                            <asp:Button ID="btnConfirmation" runat="server" Width="0" Style="width: 0px; height: 0px; font-size: 0; border: none; display: none;" />
                            <%--19-09-2019 Confirmation Box--%>
                        </td>
                    </tr>
                </table>
            </div>

            <%--   </ContentTemplate>
                  </asp:UpdatePanel>--%>
            <%-- </div>--%>
            <asp:Panel ID="pnlHedging_Type" runat="server" Class="panel">
                <div class="UCP_panelContainer">
                    <fieldset class="CheckboxListHedging_TypePanel" title="Hedging Type">
                        <legend class="lblHedging_TypeLegend" style="text-align: right">
                            <asp:Button ID="Button1" class="btnClose" CssClass="btn" runat="server" Text="X" Width="30px" CommandName="Close" OnCommand="btnHedging_TypeClose_Click" />
                        </legend>
                        <asp:CheckBoxList ID="chklistHedging_Type" runat="server">
                            <asp:ListItem Value="Manual">Hidden</asp:ListItem>
                            <asp:ListItem Value="Back to Back">Back to Back</asp:ListItem>
                            <asp:ListItem Value="Dynamic">Dynamic</asp:ListItem>
                            <asp:ListItem Value="Order">Order</asp:ListItem>
                            <asp:ListItem Value="Pooling">Pooling</asp:ListItem>
                            <asp:ListItem Value="Product">Product</asp:ListItem>
                            <asp:ListItem Value="RFQ">RFQ</asp:ListItem>
                            <asp:ListItem Value="Market">Market</asp:ListItem>
                            <asp:ListItem Value="UDF">UDF</asp:ListItem>
                            <asp:ListItem Value="Price">Price</asp:ListItem>
                            <asp:ListItem Value="Recipe Mode">Recipe Mode</asp:ListItem>
                            <asp:ListItem Value="Override UserGroup Mapping">Override UserGroup Mapping</asp:ListItem>
                            <%--  <asp:CheckBoxList ID="chklistHedging_Type" runat="server">
                        <asp:ListItem Value="Manual">Hidden</asp:ListItem>
                        <asp:ListItem Value="Back to Back">Back to Back</asp:ListItem>
                        <asp:ListItem Value="Dynamic">Dynamic</asp:ListItem>
                         <asp:ListItem Value="Market">Market</asp:ListItem>
                        <asp:ListItem Value="Order">Order</asp:ListItem>
                        <asp:ListItem Value="Pooling">Pooling</asp:ListItem>
                         <asp:ListItem Value="Price">Price</asp:ListItem>
                        <asp:ListItem Value="Product">Product</asp:ListItem>
                        <asp:ListItem Value="RFQ">RFQ</asp:ListItem>
                       <asp:ListItem Value="UDF">UDF</asp:ListItem>
                        <asp:ListItem Value="Recipe Mode">Recipe Mode</asp:ListItem>
                        <asp:ListItem Value="Override UserGroup Mapping">Override UserGroup Mapping</asp:ListItem>
                            --%>
                        </asp:CheckBoxList>
                        <div style="text-align: right;">
                            <asp:Button ID="Button2" class="btn" Text="Apply" CommandName="Apply" OnCommand="BtnHedging_TypeApply_Click" runat="server" />
                        </div>
                    </fieldset>
                </div>
            </asp:Panel>

            <asp:Panel ID="pnlCore_Field_Visibility" runat="server" Class="panel" Visible="false">
                <div class="UCP_panelContainer">
                    <fieldset class="CheckboxListCore_Field_VisibilityPanel" title="Core Field Visibility">
                        <legend class="lblCore_Field_VisibilityLegend">
                            <asp:Button ID="Button3" class="btnClose" CssClass="btn" runat="server" Text="X" Width="30px" CommandName="Close" OnCommand="btnCore_Field_VisibilityClose_Click" />
                        </legend>

                        <asp:CheckBoxList ID="chklistCore_Field_Visibility" runat="server">
                            <asp:ListItem Value=" Underlying count"></asp:ListItem>
                            <asp:ListItem Value="Tenor"></asp:ListItem>
                            <asp:ListItem Value="Currency"></asp:ListItem>
                            <asp:ListItem Value="Notional"></asp:ListItem>
                            <asp:ListItem Value="Upfront"></asp:ListItem>
                            <asp:ListItem Value="Exchange"></asp:ListItem>
                            <asp:ListItem Value="Trade"></asp:ListItem>
                            <asp:ListItem Value="Value"></asp:ListItem>
                            <asp:ListItem Value="Fixing"></asp:ListItem>
                            <asp:ListItem Value="Maturity"></asp:ListItem>
                            <asp:ListItem Value="Fixing Frequency"></asp:ListItem>
                            <asp:ListItem Value="Coupon Frequency"></asp:ListItem>
                            <asp:ListItem Value="Callable Frequency"></asp:ListItem>
                            <asp:ListItem Value="Settlement Frequency"></asp:ListItem>
                            <asp:ListItem Value="Accrual Frequency"></asp:ListItem>
                        </asp:CheckBoxList>
                        <asp:Button ID="Button4" class="btn" Text="Apply" CommandName="Apply" OnCommand="BtnCore_Field_VisibilityApply_Click" runat="server" />
                    </fieldset>
            </asp:Panel>
            <%--Added by Bhagyashri B 09-01-2020 to show long Payoff Prefix in a popup on click--%>
            <asp:Panel ID="pnlPayoffprefix" runat="server" CssClass="panel">
                <div class="UCP_panelContainer">
                    <fieldset title="Payoff Prefix" style="width: 64ch;">
                        <legend>Payoff Prefix</legend>
                        <table>
                            <tr>
                                <td>
                                    <asp:Label ID="lblPanelPayoffPrefix" runat="server"></asp:Label>
                                </td>
                                <td style="vertical-align: top;">
                                    <asp:Button ID="btnPayoffPrefixClose" runat="server" CssClass="btn" Text="X" Width="30px" CommandName="Close" OnCommand="btnPayoffPrefixClose_Command" />
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </div>
            </asp:Panel>
            <asp:Panel ID="pnlPayoffprefix2" runat="server" CssClass="panel">
                <div class="UCP_panelContainer">
                    <fieldset title="Payoff Prefix 2" style="width: 64ch;">
                        <legend>Payoff Prefix 2</legend>
                        <table>
                            <tr>
                                <td>
                                    <asp:Label ID="lblPanelPayoffPrefix2" runat="server"></asp:Label>
                                </td>
                                <td style="vertical-align: top;">
                                    <asp:Button ID="btnPayoffPrefix2Close" runat="server" CssClass="btn" Text="X" Width="30px" CommandName="Close" OnCommand="btnPayoffPrefix2Close_Command" />
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </div>
            </asp:Panel>
            <%--End by Bhagyashri B--%>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:HiddenField ID="hdnTmplSessionId" runat="server" EnableViewState="true" />
    <script type="text/javascript">

        //Added by Bhagyashri B 09-01-2020
        function displayPayoffPrefixPanel() {
            document.getElementById('<%=pnlPayoffprefix.ClientID%>').className = "panel";
            document.getElementById('<%=pnlPayoffprefix.ClientID%>').style.display = "block";
            var tempX = 0;
            var tempY = 0;
            e = window.event || event;
            tempX = e.pageX;
            tempY = e.pageY;

            document.getElementById('<%=pnlPayoffprefix.ClientID%>').style.left = tempX + "px";
            document.getElementById('<%=pnlPayoffprefix.ClientID%>').style.top = tempY + "px";
        }
        function displayPayoffPrefix2Panel() {
            document.getElementById('<%=pnlPayoffprefix2.ClientID%>').className = "panel";
            document.getElementById('<%=pnlPayoffprefix2.ClientID%>').style.display = "block";
            var tempX = 0;
            var tempY = 0;
            e = window.event || event
            tempX = e.pageX;
            tempY = e.pageY;
            document.getElementById('<%=pnlPayoffprefix2.ClientID%>').style.left = tempX + "px";
            document.getElementById('<%=pnlPayoffprefix2.ClientID%>').style.top = tempY + "px";
        }
        function displayCore_Field_VisibilityPanel() {

            document.getElementById('<%=pnlCore_Field_Visibility.ClientID%>').className = "panel";
            document.getElementById('<%=pnlCore_Field_Visibility.ClientID%>').style.display = "block";
            var tempX = 0;
            var tempY = 0;
            e = window.event || event;
            //     var bodyOffsets = document.body.getBoundingClientRect();
            tempX = e.pageX;
            tempY = e.pageY;
            //if (tempY >= 700) {
            //    tempY = 505;

            //}
            document.getElementById('<%=pnlCore_Field_Visibility.ClientID%>').style.left = tempX + "px";
            document.getElementById('<%=pnlCore_Field_Visibility.ClientID%>').style.top = tempY + "px";
        }
        function displayHedgyingTypePanel() {

            document.getElementById('<%=pnlHedging_Type.ClientID%>').className = "panel";
            document.getElementById('<%=pnlHedging_Type.ClientID%>').style.display = "block";

            var tempX = 0;
            var tempY = 0;
            e = window.event || event;
            //     var bodyOffsets = document.body.getBoundingClientRect();
            tempX = e.pageX;
            tempY = e.pageY;
            //if ( tempY >= 700)
            //{
            //    tempY = 605;

            //}
            document.getElementById('<%=pnlHedging_Type.ClientID%>').style.left = tempX + "px";
            document.getElementById('<%=pnlHedging_Type.ClientID%>').style.top = tempY + "px";


        }
        function EnterEvent(e) {
            //alert(e.keyCode)
            if (e.keyCode == 13 || e.keyCode == 9) {
                document.getElementById('<%=btnEnter.ClientID%>').click();
            }
        }

        function checkAll() {
            var chkAll = document.getElementById("ctl00_MainContent_gvTemplateMaster_ctl01_chkAll");
            var GridView = chkAll.parentNode.parentNode.parentNode;
            var inputList = GridView.getElementsByTagName("input");

            //alert(inputList.length);
            for (var i = 0; i < inputList.length; i++) {

                //var row = inputList[i].parentNode.parentNode;
                if (inputList[i].type == "checkbox" && chkAll != inputList[i]) {
                    if (chkAll.checked) {
                        inputList[i].checked = true;
                    }
                    else {
                        inputList[i].checked = false;
                    }
                }
            }
        }
        function checkChanged(current) {
            var GridView = current.parentNode.parentNode.parentNode;
            var inputList = GridView.getElementsByTagName("input");
            var chkAll = document.getElementById("ctl00_MainContent_gvTemplateMaster_ctl01_chkAll");
            var count = 0;
            var checked = 0;
            for (var i = 0; i < inputList.length; i++) {
                if (inputList[i] != chkAll) {
                    if (inputList[i].type == "checkbox") {
                        count = count + 1
                    }
                }
            }
            for (var i = 0; i < inputList.length; i++) {
                if (inputList[i] != chkAll) {
                    if (inputList[i].type == "checkbox") {
                        if (inputList[i].checked) {
                            checked = checked + 1
                        }
                    }
                }
            }
            if (checked = count) {
                $("#ctl00_MainContent_gvTemplateMaster_ctl01_chkAll").prop("checked", true);
            }
            for (var i = 0; i < inputList.length; i++) {

                //var row = inputList[i].parentNode.parentNode;
                if (inputList[i].type == "checkbox") {
                    if (!inputList[i].checked) {
                        $("#ctl00_MainContent_gvTemplateMaster_ctl01_chkAll").prop("checked", false);
                    }
                }
            }
        }
        function isNumberKey(evt) {
            var charCode = (evt.which) ? evt.which : evt.keyCode;
            if (charCode > 31 && (charCode < 48 || charCode > 57))
                return false;
            return true;
        }

        function setCollateralType(ddlCol) {     //Added by BhagyashriB on 20-Sept-2021 | discussed with HemlataA
            //Changed by BhagyashriB on 24-Sept-2021 | UWI-200
            var gridItem = ddlCol.parentNode.parentNode;
            let txtbx = gridItem.getElementsByClassName("txtCode");
            let txtColExpoType = gridItem.getElementsByClassName("colExpo_type");
            if (ddlCol.value != "") {
                txtColExpoType[0].value = txtbx[0].value;
            } else {
                txtColExpoType[0].value = "";
            }            
        }

        //function checkAll(chkAll) {
        //    var GridView = chkAll.parentNode.parentNode.parentNode;
        //    var inputList = GridView.getElementsByTagName("input");
        //    //alert(inputList.length);
        //    for (var i = 0; i < inputList.length; i++) {
        //        //var row = inputList[i].parentNode.parentNode;
        //        if (inputList[i].type == "checkbox" && chkAll != inputList[i]) {
        //            if (chkAll.checked) {
        //                inputList[i].checked = true;
        //            }
        //            else {
        //                inputList[i].checked = false;
        //            }
        //        }
        //    }
        //}
    </script>

</asp:Content>
