<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="FinIQ_UDFMET.aspx.vb" Inherits="FinIQWebApp.FinIQ_UDFMET" MasterPageFile="~/FiniqAppMasterPage.Master" MaintainScrollPositionOnPostback="True" EnableEventValidation="false" ValidateRequest="false" %>

<%@ Register Src="../FinIQ_User_Controls/DateControl.ascx" TagName="DateControl"
    TagPrefix="uc1" %>

<%@ Register Src="../FinIQ_User_Controls/DateTime_picker/UC_DateTime.ascx" TagName="UC_DateTime"
    TagPrefix="uc3" %>
 

<%--<%@ Register Src="../FinIQ_User_Controls/FilePathControl.ascx" TagName="FilePathControl"
    TagPrefix="uc2" %>--%>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="../FinIQ_User_Controls/ShareCollectionControl/ShareCollectionControl.ascx" TagName="ShareCollection" TagPrefix="uc4" %>
<%@ Register Src="~/UCP/LayoutDesignControls/UCP_ModuleSchemeTemplateSearch_Control.ascx" TagName="ModuleSchemeTemplateSearch" TagPrefix="uc5" %>
<%@ Register Src="../FinIQ_User_Controls/MultiSelectDropDown/UC_MultiSelectDropDown.ascx" TagName="MultiSelect" TagPrefix="uc6" %>
<%@ Register Src="~/FinIQ_User_Controls/UCP_TimeControl/UCP_TimeControl.ascx" TagName="UC_Time" TagPrefix="uc7" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    </asp:ScriptManagerProxy>
    <link href="../App_Themes/Style1.css" rel="stylesheet" type="text/css" />
    <link href='<%=ResolveClientUrl("~/FinIQJS/DateTimePicker.css")%>' rel="stylesheet" type="text/css" />
    <link href="../FinIQJS/FreezeGrid.css" type="text/css" rel="stylesheet">
    <script src="../FinIQJS/FreezeGrid.js" type="text/javascript"></script>
    <script src='<%=ResolveClientUrl("~/FinIQJS/DateTimePicker.js")%>' type="text/javascript"></script>
    <script src="../FinIQJS/jquery.js" type="text/javascript"></script>
    <script src="../FinIQ_User_Controls/UCP_TimeControl/UCP_TimeControl.js" type="text/javascript"></script>
    <script type="text/javascript">
        freezeCols = 0;

        /* Added by BhagyashriB on 23-Nov-2021 | to show body after page loaded completely, UWI-209 */
        document.onreadystatechange = function () {
            if (document.readyState !== "complete") {
                document.querySelector("body").style.visibility = "hidden";
                document.querySelector("#loader").style.visibility = "visible";
            } else {
                document.querySelector("#loader").style.display = "none";
                document.querySelector("body").style.visibility = "visible";
            }
        };

    </script>
    <style type="text/css">
        .CtlRowHeight {
            height: 40px;
        }

        #Controls {
            width: 1800px;
            /*height: 100px; By Bhagyashri on 4-Dec-2019 */
            padding: 6px;
        }

        .displayNone {
            display: none;
        }

        #SearchBoxContainer {
            float: left;
        }
        .Search {
    background-image: url(../App_Resources/SearchMB.png);
    background-color: Transparent;
    background-size:16px;
    background-position:center right;
    background-repeat:no-repeat;
}/*Shekhar L,AkshayD  Search icon changes uwi-343*/
        #GridDiv {
            min-width: 1813px;
            /*height: 800px;*/ /*Commented by Bhagyashri B 30-12-2019*/
            padding-top: 6px;
            overflow-x: hidden;
            border-collapse: collapse;
        }

        .DisplayWidth {
            /*min-width:120px;
            max-width:120px;*/
            width: auto;
        }

        .CaptionWidth {
            /*min-width:120px;
            max-width:120px;*/
            width: auto;
        }

        .CaptionWidth1 {
            /*min-width:190px;
            max-width:190px;*/
            width: auto;
        }

            .CaptionWidth1 a:link, .CaptionWidth1 a:visited, .CaptionWidth1 a:hover {
                text-decoration: none;
                color: black;
                width: 100%;
                display: inline-block;
                line-height: 22px;
            }

        .DataSizeWidth {
            /*min-width:110px;
            max-width:110px;*/
            width: auto;
        }

        .BorderNone {
            border: 0px solid #ddd !important;
        }

        .lblErrorCreateSubTemplate {
            color: crimson;
            font-family: Verdana;
            background-color: white;
        }

        .lblerrorSuccessMsg {
            color: blue;
            font-family: Verdana;
        }

        .groupBoxGrids2 /* for cloneudf*/ {
            position: absolute !important;
            background-color: #fefefe;
            left: 50vh;
            top: 30vh;
            min-width: 350px;
            min-height: 220px;
            display: none;
            z-index: 10000;
        }

        .groupBoxGrids3 /* for cloneudf*/ {
            position: fixed !important;
            background-color: #f0f0f0;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(90, 90, 90, 0.5);
            z-index: 9;
            min-width: 100vw;
            min-height: 100vh;
            display: none;
            opacity: 0.4;
        }

        .groupBoxGrids2SubTemplate /* for cloneudf*/ {  /* Changes by BhagyashriB on 27-Oct-2021 | for black theme changes, UWI-209 */
            border-collapse: collapse;
            border: 1px solid #808080;
            position: absolute !important;
            left: 10vh;
            top: 10vh;
            z-index: 9990;
        }

        .groupBoxGrids3SubTemplate /* for cloneudf*/ { /* Changes by BhagyashriB on 27-Oct-2021 | for black theme changes, UWI-209 */ 
            position: fixed !important;
            background-color: #808080;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            background: #666;
            z-index: 9;
            min-width: 100vw;
            min-height: 100vh;
            display: none;
            opacity: 0.4;
            border: 1px solid #ddd;
        }

        .groupBoxGrids3SubTemplateclone /* for cloneudf*/ {
            position: fixed !important;
            background-color: #f0f0f0;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(90, 90, 90, 0.5);
            z-index: 9999;
            min-width: 100vw;
            min-height: 100vh;
            display: none;
            opacity: 0.4;
        }

        .groupBoxGrids2CreateSubTemplate { /* Changes by BhagyashriB on 27-Oct-2021 | for black theme changes, UWI-209 */ 
            border-collapse: collapse;
            border: 1px solid #808080;
            position: absolute !important;
            left: 40vh;
            top: 21vh;
            z-index: 9999;
        }

        .groupBoxGrids3CreateSubTemplate {
            position: fixed !important;
            background-color: #808080;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            background: #666;
            z-index: 9999;
            min-width: 100vw;
            min-height: 100vh;
            display: none;
            opacity: 0.4;
            border: 1px solid #ddd;
        }

        /* .PopupCcy {

            position:absolute;
            z-index:999;
            float:left;
            width:550px;
           min-height:150px;
            padding:5px;
            background-color:#FFF;
            border:solid 1px #DDDDDD;
        }

            .PopupCcy li {
                 min-width:150px;
                 float:left;
                 padding:5px;
                 list-style:none;
            }*/

        .PopupCcy {
            color: #000000;
            border: solid 1px #DDDDDD;
            box-shadow: 2px 2px 2px #333333;
            padding: 5px;
            height: auto;
            box-sizing: border-box;
            clear: both;
            background-color: #FFFFFF;
            z-index: 999;
            position: absolute;
        }

            .PopupCcy td {
                width: max-content;
                color: #000000;
                background-color: #FFFFFF;
                border: none 1px #FFF;
                padding: 10px 15px 10px 40px;
                background-repeat: no-repeat;
                background-size: contain;
            }

        .PopupContainer {
            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;
        }

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

        .relative-grid {
            position: initial !important;
        }

        /* Added by BhagyashriB on 23-Nov-2021 | UWI-209 */
        .center {   
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            margin: auto;
        }

        body {
            visibility: hidden;
        }

        .loadingDiv{
            top:13px !important; 
            position:absolute !important;
            margin-left:467px;
        }

       
        /* End by BhagyashriB on 23-Nov-2021 | UWI-209 */

    </style>
    <input id="hdnpnlsubtemplatevisible" type="hidden" value="false" runat="server" />
    <input id="hdnpnlaudittrailvisible" type="hidden" value="false" runat="server" />
    <input id="hdnpnlCreateSubTemplatevisible" type="hidden" value="false" runat="server" />
    <input id="hdnpnlCloneFieldVisible" type="hidden" value="false" runat="server" />
    <input id="hdnpnlSubtemplateCloneVisible" type="hidden" value="false" runat="server" />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>

            <asp:Label ID="lblMessage" runat="server" CssClass="lblError" Text="" ForeColor="#0368B6" Style="margin-left: 10px"></asp:Label>
            <asp:Label ID="lblError" runat="server" CssClass="lblError" Text="" ForeColor="red" Style="margin-left: 10px"></asp:Label>

            <div id="Controls">
                <table cellspadding="3" cellspacing="3">
                    <tr>
                        <td colspan="2">
                            <uc5:ModuleSchemeTemplateSearch ID="modSchmTmplSrch" EnableViewState="true" runat="server" OnValueSelected="updateModSchmTmplValues" />
                        </td>
                        <td>
                            <asp:Label ID="lblSearchBy" CssClass="lbl" runat="server" Text="Search By"></asp:Label>
                            <asp:DropDownList ID="cboSearch" runat="server" Width="185px" CssClass="ddl" AutoPostBack="false">
                                <asp:ListItem>Display Name</asp:ListItem>
                                <%--Change by Bhagyashri 12-11-2019 for sorting dropdowns --%>
                                <asp:ListItem>Datatype</asp:ListItem>
                                <asp:ListItem>Interface Key</asp:ListItem>
                                <asp:ListItem>Interface Link</asp:ListItem>
                                <asp:ListItem>Mandatory</asp:ListItem>
                                <asp:ListItem>Mutation</asp:ListItem>
                                <asp:ListItem>Name</asp:ListItem>
                                <asp:ListItem>Read Only</asp:ListItem>
                                <asp:ListItem>Unique</asp:ListItem>
                                <asp:ListItem>Visible</asp:ListItem>
                            </asp:DropDownList>

                            <asp:TextBox ID="txtsearch" runat="server" onfocus="this.select();" onmouseup="return false;" Width="185px" CssClass="Search" OnTextChanged="txtSearch_TextChanged" onkeydown="return EnterEvent(event)" AutoPostBack="true"></asp:TextBox>
                            <asp:Button ID="btnEnter" runat="server" class="displayNone" />
                        </td>
                        <td class="ctlBlotterPaddingRight">
                            <asp:Button ID="btnLoad" runat="server" Text="Load" Width="110" CssClass="btn" />
                            <asp:Button ID="btnSave" runat="server" Text="Save" Width="110" CssClass="btn" />
                            <asp:Button ID="btnCreatetable" runat="server" Text="Create Table" Width="110" CssClass="btn" />
                            <asp:Button ID="btnCloneUDF" runat="server" Text="Clone UDF" Width="110" CssClass="btn" />
                        </td>
                        <td class="lblBlotterPaddingRight">
                            <asp:Label ID="TemplateID" runat="server" CssClass="lbl" Text="Template ID"></asp:Label></td>
                        <td class="ctlBlotterPaddingRight">
                            <asp:Label ID="Template_ID" CssClass="lbl" runat="server"></asp:Label></td>
                        <td>
                            <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"
                                DisplayAfter="0">
                                <ProgressTemplate>
                                    <div class="divLoading">
                                        <img alt="Loading" src="../App_Resources/loading.gif" style="height: 50px;" />
                                        <span class="lbl">Loading...
                                    </div>
                                    </span>
                                </ProgressTemplate>
                            </asp:UpdateProgress>
                        </td>
                    </tr>
                    <tr>
                        <td class="lblBlotterPaddingRight">
                            <asp:Label ID="lblModule" CssClass="lbl" runat="server">Module</asp:Label>
                        </td>
                        <td class="lblBlotterPaddingRight">
                            <asp:DropDownList ID="ddlmodule" Width="180px" runat="server" CssClass="ddl" AutoPostBack="true"></asp:DropDownList>
                        </td>
                        <td>
                            <asp:FileUpload ID="fileuploadExcel" type="file" size="52" name="clientfile" runat="server" Width="246px" /><%--Height="26px"--%>
                            <asp:Button ID="btnImport" runat="server" Text="Import" Width="90" Enabled="True" CssClass="btn" />
                            <asp:Button ID="btnExport" runat="server" Text="Export" Width="90" CssClass="btn" />
                        </td>
                        <td class="ctlBlotterPaddingRight">
                            <asp:Button ID="btnAdd" runat="server" Text="Add" Width="110" CssClass="btn" />
                            <asp:Button ID="btnDelete" runat="server" Text="Delete" Width="110" CssClass="btn" />
                            <asp:Button ID="btnDealEntry" runat="server" Text="Deal Entry" Width="110" CssClass="btn" />
                            <asp:Button ID="btnDSNReport" runat="server" Text="DSN Report" Width="110" Enabled="True" CssClass="btn" />
                        </td>
                        <asp:Label ID="StatusBar" runat="server" CssClass="lbl"></asp:Label>
                        <td class="lblBlotterPaddingRight">
                            <asp:Label ID="TemplateCode" runat="server" CssClass="lbl" Text="Template Code"></asp:Label></td>
                        <td class="ctlBlotterPaddingRight">
                            <asp:Label ID="Template_Code" runat="server" CssClass="lbl"></asp:Label></td>
                    </tr>
                    <tr>
                        <td class="lblBlotterPaddingRight">
                            <asp:Label ID="lblScheme" runat="server" CssClass="lbl">Scheme</asp:Label></td>
                        <td class="ctlBlotterPaddingRight">
                            <asp:DropDownList ID="ddlscheme" runat="server" CssClass="ddl" AutoPostBack="true" Width="180"></asp:DropDownList></td>
                        <td>
                            <asp:Label ID="lblTableExisting" CssClass="lbl" runat="server"></asp:Label></td>
                        <td>
                            <asp:Button ID="btnLayout" runat="server" Text="Layout Designer" Width="110" CssClass="btn" />
                            <asp:Button runat="server" ID="btnOpenSubTemplateDetails" CssClass="btn" Text="Sub Template Master" Width="110px" style="font-size:10px !important" />
                            <asp:Button ID="btnSubTemplate" runat="server" Text="Sub Template Fields" Width="110" CssClass="btn" />
                            <%--<asp:Button ID="btnTemplateMaster" runat="server" Text="Template Master" Width="110" CssClass="btn" />--%>
                            <asp:Button ID="btnAuditTrail" runat="server" Text="Audit Trail" Width="110" CssClass="btn" />
                        </td>
                        <td class="lblBlotterPaddingRight">
                            <asp:Label ID="lblRowsPerPage" CssClass="lbl" runat="server" Text="Rows Per Page"></asp:Label>
                        </td>
                        <td class="ctlBlotterPaddingRight">
                            <asp:TextBox ID="txtRowsPerPage" runat="server" AutoPostBack="true" onfocus="this.select();" onmouseup="return false;" OnTextChanged="TxtRowsPerPage_TextChanged" Width="50px" Text="10" onkeydown="return EnterEvent(event)" MaxLength="3"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="lblBlotterPaddingRight">
                            <asp:Label ID="lblTemplate" runat="server" CssClass="lbl" Text="Template"></asp:Label></td>
                        <td class="ctlBlotterPaddingRight">
                            <asp:DropDownList ID="ddltemplate" Width="180px" runat="server" CssClass="ddl" AutoPostBack="true">
                            </asp:DropDownList>
                        </td>
                    </tr>
                </table>
            </div>
            <div id="GridDiv" style="margin-left: 10px; position: initial !important;">

                <asp:GridView ID="dgvMetaData" runat="server" VerticalContentAlignment="Center" AutoGenerateColumns="False" CssClass="Grid" AllowSorting="True" ShowHeaderWhenEmpty="True" AllowPaging="true" PageSize="99" OnPageIndexChanging="FuncDefOnPageIndexChanging"
                    EmptyDataText="No Records Found" EnableViewState="true" RowHeadersWidthSizeMode="DisableResizing;" SelectedRowStyle-Wrap="true" HeaderStyle-CssClass="GridHeaderTitle">

                    <SelectedRowStyle CssClass="GridItemSelect" />
                    <RowStyle CssClass="GridItem" />
                    <HeaderStyle CssClass="GridHeader" />
                    <FooterStyle CssClass="GridFooter" />
                    <PagerStyle CssClass="GridPager" />
                    <Columns>
                        <asp:TemplateField>
                            <HeaderStyle Wrap="true" HorizontalAlign="Center" VerticalAlign="Middle" />
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="false" />
                            <HeaderTemplate>
                                <asp:CheckBox ID="chkAll" runat="server" onClick="checkallbox(this)" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="CheckRecord" runat="server" onClick="checkchanged(this)" />
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Sr No" Visible="False">
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                            <ItemTemplate>
                                <asp:Label ID="lblSr_No" runat="server" Text='<%# Eval("Sr_No")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Name" ItemStyle-CssClass="CaptionWidth" HeaderStyle-CssClass="CaptionWidth">
                            <HeaderStyle Wrap="true"></HeaderStyle>
                            <ItemStyle Wrap="True" />
                            <ItemTemplate>
                                <asp:TextBox ID="TxtName" runat="server" onfocus="this.select(); checkCurrentRecord(this);" onmouseup="return false;" Style="border: 0px solid !important;" Width="180px" Enabled="false" onKeypress="return onlyAlphaNumberDecimal(event, this)" Text='<%#Eval("Field_Name")%>'></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Display Name" ItemStyle-CssClass="CaptionWidth" HeaderStyle-CssClass="CaptionWidth">
                            <HeaderStyle Wrap="False"></HeaderStyle>
                            <ItemStyle Wrap="True" />
                            <ItemTemplate>
                                <asp:TextBox ID="TxtDisplayName" runat="server" onfocus="this.select(); checkCurrentRecord(this);" onmouseup="return false;" BorderStyle="none" Width="180px" Style="border: 0px solid !important;" Text='<%#Eval("Field_Display_Name")%>'></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Data Type" ItemStyle-CssClass="DataSizeWidth" HeaderStyle-CssClass="DataSizeWidth">
                            <HeaderStyle Wrap="False"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:DropDownList ID="ddlDataType" CssClass="ddl" runat="server" OnTextChanged="RowSelected" AutoPostBack="true" EnableViewState="true" OnSelectedIndexChanged="ddlDataType_SelectedIndexChanged"></asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Data Size" ItemStyle-CssClass="DataSizeWidth" HeaderStyle-CssClass="DataSizeWidth">
                            <HeaderStyle Wrap="False"></HeaderStyle>
                            <ItemStyle Wrap="True" />
                            <ItemTemplate>
                                <asp:TextBox ID="txtDataSize" runat="server" onfocus="this.select(); checkCurrentRecord(this);" onmouseup="return false;" Width="110px" Style="border: 0px solid !important;" Text='<%# Eval("Data_Size")%>'></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Sourcing Link">
                            <HeaderStyle Wrap="False"></HeaderStyle>
                            <ItemStyle Wrap="True" HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:DropDownList ID="ddlSourcingLink" CssClass="ddl" OnTextChanged="RowSelected" runat="server" AutoPostBack="true" Width="120" autosizeItems="True" OnSelectedIndexChanged="ddlSourcingLink_SelectedIndexChanged"></asp:DropDownList>
                                <asp:TextBox ID="txtSourcingLink" runat="server" onfocus="checkCurrentRecord(this);" Style="border: 0px solid !important;" Text='<%#Eval("Reference")%>'></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Default" ItemStyle-CssClass="CaptionWidth1" HeaderStyle-CssClass="CaptionWidth1">
                            <HeaderStyle Wrap="True"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Left" Wrap="True" />
                            <ItemTemplate>
                                <uc1:DateControl ID="txtDate" runat="server" OnClientClick="checkCurrentRecord(this);" SetDefaultDate="false" ControlWidth="158" TextBoxPaddding="0" ButtonPaddding="5" CalenderCss="btn1" autopostback="true" width="190" text='<%#Eval("Field_Default_Value")%>' />
                                <uc3:UC_DateTime ID="txtDateTime" runat="server" OnTextChanged="RowSelected" CalenderCss="btn1" autopostback="true" width="190" text='<%#Eval("Field_Default_Value")%>' />
                                <uc4:ShareCollection ID="txtSharecollection" runat="server" OnTextChanged="RowSelected" ShareWidth="190" Text='<%#Eval("Field_Default_Value")%>' />
                                <asp:DropDownList ID="ddlDefault" CssClass="ddl" runat="server" onchange="checkCurrentRecord(this);" Width="190"></asp:DropDownList>
                                <asp:TextBox ID="TxtDefault" runat="server" onfocus="this.select(); checkCurrentRecord(this);" onmouseup="return false;" Width="190" Style="border: 0px solid !important" Text='<%#Eval("Field_Default_Value")%>'></asp:TextBox>
                                <asp:FileUpload ID="btnBrowse" type="file" size="52" name="clientfile" AutoPostBack="true" Onclick="RowSelectedImage(this,event);" runat="server" Width="246px" Height="26px" />
                                <%--<uc2:FilePathControl ID="FileUploadControl" runat="server" width="180" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Field_Default_Value").ToString)%>' />
                                --%>
                                <asp:LinkButton ID="lnk_TextArea" runat="server" Style="text-decoration: none; color: black" Visible="false" AutoPostBack="true" OnTextChanged="RowSelected" OnClick="lnk_TextArea_Click" Text="SelectTextHere"></asp:LinkButton>
                                <uc6:MultiSelect ID="ddlMultiDefault" OnSelectedIndexChanged="RowSelected" EnableViewState="true" runat="server" isDropDownPostBack="true" />
                                <uc7:UC_Time ID="txtTime" runat="server" OnTextChanged="RowSelected" width="158" text='<%#Eval("Field_Default_Value")%>'></uc7:UC_Time>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Format">
                            <HeaderStyle Wrap="true"></HeaderStyle>
                            <ItemStyle Wrap="True" />
                            <ItemTemplate>
                                <%--<asp:TextBox ID="txtFormat" Width="40px" runat="server" AutoPostBack="true" OnTextChanged="RowSelected" Style="border: 0px solid !important;" Text='<%#Eval("UDF_Format")%>'></asp:TextBox>--%>
                                <asp:DropDownList ID="ddlFormat" Width="60px" CssClass="ddl" onchange="checkCurrentRecord(this);" runat="server" Style="border: 0px solid !important;" Text='<%#Eval("UDF_Format")%>'>
                                    <asp:ListItem Text="" Value=""></asp:ListItem>
                                    <asp:ListItem Text="0" Value="0"></asp:ListItem>
                                    <asp:ListItem Text="1" Value="1"></asp:ListItem>
                                    <asp:ListItem Text="2" Value="2"></asp:ListItem>
                                    <asp:ListItem Text="3" Value="3"></asp:ListItem>
                                    <asp:ListItem Text="4" Value="4"></asp:ListItem>
                                    <asp:ListItem Text="5" Value="5"></asp:ListItem>
                                    <asp:ListItem Text="6" Value="6"></asp:ListItem>
                                    <asp:ListItem Text="7" Value="7"></asp:ListItem>
                                    <asp:ListItem Text="8" Value="8"></asp:ListItem>
                                    <asp:ListItem Text="9" Value="9"></asp:ListItem>
                                    <asp:ListItem Text="10" Value="10"></asp:ListItem>
                                    <asp:ListItem Text="11" Value="11"></asp:ListItem>
                                    <asp:ListItem Text="12" Value="12"></asp:ListItem>
                                    <asp:ListItem Text="13" Value="13"></asp:ListItem>
                                    <asp:ListItem Text="14" Value="14"></asp:ListItem>
                                    <asp:ListItem Text="15" Value="15"></asp:ListItem>
                                    <asp:ListItem Text="16" Value="16"></asp:ListItem>
                                    <asp:ListItem Text="17" Value="17"></asp:ListItem>
                                    <asp:ListItem Text="18" Value="18"></asp:ListItem>
                                    <asp:ListItem Text="19" Value="19"></asp:ListItem>
                                    <asp:ListItem Text="20" Value="20"></asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Mandatory">
                            <HeaderStyle Wrap="False"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:CheckBox ID="ChkMandatory" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("Mandatory")%>' />
                            </ItemTemplate>
                        </asp:TemplateField>

                        <%--Added by VijayH || 13-May-2022--%>
                        <asp:TemplateField HeaderText="Clone">
                            <HeaderStyle Wrap="False"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:CheckBox ID="ChkClone" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("Clone")%>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Visible">
                            <HeaderStyle Wrap="False"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:CheckBox ID="ChkDealEntry" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("Deal_Entry")%>' />
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Read Only">
                            <HeaderStyle Wrap="False"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:CheckBox ID="ChkReadOnly" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("Read_Only")%>' />
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Schedule Check">
                            <HeaderStyle CssClass="ChkColWidth"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" CssClass="ChkColWidth" />
                            <ItemTemplate>
                                <asp:CheckBox ID="ChkSchedule" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("ScheduleChk")%>' />
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Interface Key">
                            <HeaderStyle CssClass="ChkColWidth"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" CssClass="ChkColWidth" />
                            <ItemTemplate>
                                <asp:CheckBox ID="ChkInterfaceKey" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("Interface_Key")%>' />
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Mutation">
                            <HeaderStyle Wrap="False"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:CheckBox ID="ChkMutation" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%# Eval("Mutation")%>' />
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Unique">
                            <HeaderStyle CssClass="ChkColWidth"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" CssClass="ChkColWidth" />
                            <ItemTemplate>
                                <asp:CheckBox ID="ChkUnique" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("Unique")%>' />
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Concat">
                            <HeaderStyle CssClass="ChkColWidth"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" CssClass="ChkColWidth" />
                            <ItemTemplate>
                                <asp:CheckBox ID="ChkConcat" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("Concat")%>' />
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Validation type" ItemStyle-CssClass="CaptionWidth1" HeaderStyle-CssClass="CaptionWidth1">
                            <HeaderStyle Wrap="true"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Left" Wrap="True" />
                            <ItemTemplate>
                                <%--<asp:DropDownList ID="ddlValidation" Width="120px" CssClass="ddl" OnTextChanged="RowSelected" runat="server" AutoPostBack="true">--%>
                                <uc6:MultiSelect ID="ddlValidation" OnSelectedIndexChanged="ddlValidation_SelectedIndexChanged" EnableViewState="true" runat="server" isDropDownPostBack="true" />
                                <%-- Text='<%#Eval("UDF_Feature1")%>'--%>
                                <%-- <asp:ListItem Text="" Value=""></asp:ListItem>
                                     <asp:ListItem Text="Allow Blank Date" Value="Allow Blank Date"></asp:ListItem>
                                    <asp:ListItem Text="Allow Negative" Value="Allow Negative"></asp:ListItem>
                                    <asp:ListItem Text="Width" Value="Width"></asp:ListItem>
                                    <asp:ListItem Text="Hybrid Input" Value="Hybrid Input"></asp:ListItem>
                                    <asp:ListItem Text="Length" Value="Length"></asp:ListItem>
                                    <asp:ListItem Text="LowerCase" Value="LowerCase"></asp:ListItem>
                                    <asp:ListItem Text="Multiselect Dropdown" Value="Multiselect Dropdown"></asp:ListItem>
                                      <asp:ListItem Text="No Blank Row" Value="NoBlankRow"></asp:ListItem>
                                    <asp:ListItem Text="Radio Button" Value="Radio Button"></asp:ListItem>
                                    <asp:ListItem Text="Railway Line" Value="Railway Line"></asp:ListItem>
                                    <asp:ListItem Text="Range Between" Value="Range Between"></asp:ListItem>
                                    <asp:ListItem Text="Show Picker" Value="Show Picker"></asp:ListItem>
                                    <asp:ListItem Text="Toggle Button" Value="Toggle Button"></asp:ListItem>
                                    <asp:ListItem Text="UpperCase" Value="UpperCase"></asp:ListItem>--%>
                                <%--</asp:DropDownList>--%>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Validation SubType">
                            <HeaderStyle Wrap="true"></HeaderStyle>
                            <ItemStyle />
                            <ItemTemplate>
                                <asp:TextBox ID="txtSubValidation" Width="80px" onfocus="this.select(); checkCurrentRecord(this);" onmouseup="return false;" Style="border: 0px solid !important;" runat="server" Text='<%#Eval("UDF_Feature2")%>'>
                                </asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Interface Data type" ItemStyle-CssClass="DisplayWidth" HeaderStyle-CssClass="DisplayWidth">
                            <HeaderStyle Wrap="False"></HeaderStyle>
                            <ItemStyle />
                            <ItemTemplate>
                                <asp:DropDownList ID="ddlUDF_InterfaceLink_DataType" CssClass="ddl" runat="server" AutoPostBack="true" Style="border: 0px solid !important;" OnTextChanged="RowSelected" OnSelectedIndexChanged="ddlUDF_InterfaceLink_DataType_SelectedIndexChanged" Text='<%#Eval("UDF_InterfaceLink_DataType")%>'>
                                    <asp:ListItem Text="TEXT" Value=""></asp:ListItem>
                                    <asp:ListItem Text="COMMON DATA" Value="COMMON DATA"></asp:ListItem>

                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Interface Data Sourcinglink" ItemStyle-CssClass="DisplayWidth" HeaderStyle-CssClass="DisplayWidth">
                            <HeaderStyle Wrap="True"></HeaderStyle>
                            <ItemStyle />
                            <ItemTemplate>
                                <asp:DropDownList ID="ddlUDF_InterfaceLink_SourcingLink" CssClass="ddl" runat="server" AutoPostBack="true" Style="border: 0px solid !important;" OnTextChanged="RowSelected" OnSelectedIndexChanged="ddlUDF_InterfaceLink_SourcingLink_SelectedIndexChanged">
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Interface Link" ItemStyle-CssClass="DisplayWidth" HeaderStyle-CssClass="DisplayWidth">
                            <HeaderStyle Wrap="False"></HeaderStyle>
                            <ItemStyle />
                            <ItemTemplate>
                                <asp:DropDownList ID="ddlInterfaceLink" onchange="checkCurrentRecord(this);" runat="server" CssClass="ddl" AutoPostBack="true" Width="120"></asp:DropDownList> <%--added onchange by OnkarE on 17-Jan-2022 JIRA:UBSKFSINT-123--%>
                                <asp:TextBox ID="txtInterfaceLink" runat="server" onfocus="this.select(); checkCurrentRecord(this);" onmouseup="return false;" Width="120px" Style="border: 0px solid !important;" Text='<%#Eval("Interface_Link")%>'>></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Helptext" ItemStyle-CssClass="DisplayWidth" HeaderStyle-CssClass="DisplayWidth" Visible="True">
                            <HeaderStyle Wrap="False"></HeaderStyle>
                            <ItemStyle Wrap="True" />
                            <ItemTemplate>
                                <asp:TextBox ID="txtHelptext" Width="120px" runat="server" onfocus="this.select(); checkCurrentRecord(this);" onmouseup="return false;" Style="border: 0px solid !important;" Text='<%#Eval("UDF_HelpText")%>'></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Color">
                            <HeaderStyle Wrap="False"></HeaderStyle>
                            <ItemStyle Wrap="True" />
                            <ItemTemplate>
                                <asp:TextBox ID="txtColor" runat="server" Width="60px" onfocus="this.select(); checkCurrentRecord(this);" onmouseup="return false;" Style="border: 0px solid !important;" Text='<%#Eval("UDF_Color")%>' />
                                <cc1:ColorPickerExtender
                                    ID="txtColor_ColorPickerExtender"
                                    TargetControlID="txtColor"
                                    Enabled="True"
                                    runat="server"></cc1:ColorPickerExtender>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="FontSize">
                            <HeaderStyle Wrap="true"></HeaderStyle>
                            <ItemStyle Wrap="True" />
                            <ItemTemplate>
                                <%--Added by VijayH on 07-02-2022 to disable Paste and allow only Numeric Values--%>
                                <asp:TextBox ID="txtFontSize" onfocus="this.select(); checkCurrentRecord(this);" onmouseup="return false;" Width="40px" runat="server" Style="border: 0px solid !important;" onpaste="return false" oncopy="return false" onKeypress="return AllowOnlyNumeric()" Text='<%#Eval("UDF_FontSize")%>'></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Font Name">
                            <HeaderStyle Wrap="true"></HeaderStyle>
                            <ItemStyle />
                            <ItemTemplate>
                                <asp:DropDownList ID="ddlfontName" Width="120px" CssClass="ddl" onchange="checkCurrentRecord(this);" runat="server" Text='<%#Eval("UDF_FontName")%>'>
                                    <asp:ListItem Text="" Value=""></asp:ListItem>
                                    <asp:ListItem Text="Comic Sans MS" Value="Comic Sans MS"></asp:ListItem>
                                    <asp:ListItem Text="Fixed Width" Value="Fixed Width"></asp:ListItem>
                                    <asp:ListItem Text="Georgia" Value="Georgia"></asp:ListItem>
                                    <asp:ListItem Text="Helvetica" Value="Helvetica"></asp:ListItem>
                                    <asp:ListItem Text="Narrow" Value="Narrow"></asp:ListItem>
                                    <asp:ListItem Text="Sans Serif" Value="Sans Serif"></asp:ListItem>
                                    <asp:ListItem Text="Verdana" Value="Verdana"></asp:ListItem>
                                    <asp:ListItem Text="Wide" Value="Wide"></asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Bold">
                            <HeaderStyle Wrap="False"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:CheckBox ID="chkbold" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("Bold")%>' />
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Italic">
                            <HeaderStyle Wrap="False"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:CheckBox ID="chkItalic" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("Italic")%>' />
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Underline">
                            <HeaderStyle Wrap="False" Font-Underline="true"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:CheckBox ID="chkUnderline" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("Underline")%>' />
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Height">
                            <HeaderStyle Wrap="true"></HeaderStyle>
                            <ItemStyle Wrap="True" />
                            <ItemTemplate>
                                <%--Added by VijayH on 07-02-2022 to disable Paste and allow only Numeric Values--%>
                                <asp:TextBox ID="txtFieldHeight" onfocus="this.select(); checkCurrentRecord(this);" onmouseup="return false;" Width="40px" runat="server" Style="border: 0px solid !important;" onpaste="return false" oncopy="return false" onKeypress="return AllowOnlyNumeric()" Text='<%#Eval("Field_Height")%>'></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Custom Tab Reference">
                            <HeaderStyle Wrap="False"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" Wrap="True" />
                            <ItemTemplate>
                                <asp:TextBox ID="txtCustomTabReference" Width="140px" runat="server" onfocus="this.select(); checkCurrentRecord(this);" onmouseup="return false;" Style="border: 0px solid !important;" Text='<%#Eval("UDF_CustomTab_Reference")%>'></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Label Width">
                            <HeaderStyle Wrap="true"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" Wrap="True" />
                            <ItemTemplate>
                                <%--Added by VijayH on 07-02-2022 to disable Paste and allow only Numeric Values--%>
                                <asp:TextBox ID="txtLabelWidth" onfocus="this.select(); checkCurrentRecord(this);" onmouseup="return false;" Width="40px" runat="server" onpaste="return false" oncopy="return false" onKeypress="return AllowOnlyNumeric()" Style="border: 0px solid !important;" Text='<%#Eval("Label_Width")%>'></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Column Width">
                            <HeaderStyle Wrap="true"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" Wrap="True" />
                            <ItemTemplate>
                                <%--Added by VijayH on 07-02-2022 to disable Paste and allow only Numeric Values--%>
                                <asp:TextBox ID="txtColumnWidth" onfocus="this.select(); checkCurrentRecord(this);" onmouseup="return false;" Width="40px" runat="server" onpaste="return false" oncopy="return false" onKeypress="return AllowOnlyNumeric()" Style="border: 0px solid !important;" Text='<%#Eval("Column_Width")%>'></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Active YN">
                            <HeaderStyle Wrap="true"></HeaderStyle>
                            <ItemStyle Wrap="True" />
                            <ItemTemplate>
                                <asp:DropDownList ID="ddlActiveYN" Width="40px" onchange="checkCurrentRecord(this);" class="dll" runat="server" Style="border: 0px solid !important;">
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Created By" ItemStyle-CssClass="DisplayWidth" HeaderStyle-CssClass="DisplayWidth">
                            <HeaderStyle Wrap="False"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" Wrap="True" />
                            <ItemTemplate>
                                <asp:Label ID="lblCreatedBy" Width="80px" runat="server" AutoPostBack="true" Style="border: 0px solid !important;" Text='<%# Eval("CreatedBy")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Created At" ItemStyle-CssClass="DisplayWidth" HeaderStyle-CssClass="DisplayWidth">
                            <HeaderStyle Wrap="False"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" Wrap="True" />
                            <ItemTemplate>
                                <asp:Label ID="lblCreatedAt" Width="80px" runat="server" AutoPostBack="true" Style="border: 0px solid !important;" Text='<%#Eval("CreatedAt")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                    </Columns>
                    <SelectedRowStyle Wrap="True" />
                </asp:GridView>

            </div>
            <div id="dialog_Confirm" title="Conformation-box" style="display: none; overflow: hidden; height: 750px; border: solid 1px #DDDDDD; border-bottom-width: 0px;">
                <iframe id="iFrame_Reconfirm" style="overflow: auto; width: 100%; height: 100%; border: 0px"></iframe>
            </div>

        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="btnExport" />
            <asp:PostBackTrigger ControlID="btnImport" />
            <asp:PostBackTrigger ControlID="btnSave" />
        </Triggers>
    </asp:UpdatePanel>

    <asp:UpdatePanel ID="UpdatePanel2" runat="server" class="PanelPad">
        <ContentTemplate>
            <asp:Panel ID="pnlBackground" runat="server" CssClass="groupBoxGrids3"></asp:Panel>
            <asp:Panel ID="pnlCloneField" runat="server" CssClass="groupBoxGrids2">
                <fieldset class="MainFieldSet" style="margin: 10px; border: solid; border-width: 1px; border-color: #d3d3d3">
                    <table style="margin: 10px; border-spacing: 2px 8px;">
                        <tr>
                            <td style="text-align: left; margin-top: 20px;" colspan="2">
                                <asp:Label ID="lblerrorpop" runat="server" Text=" "></asp:Label>
                                <asp:HiddenField ID="hdnlblerrorpop" runat="server" ClientIDMode="Static" EnableViewState="true" />
                            </td>
                        </tr>
                        <tr>
                            <%--<td>
                                <asp:TextBox ID="txtCloneUDFNotice" runat="server" ReadOnly="true" Text="Select target template where the selected UDF Fields are to be copied" TextMode="MultiLine"></asp:TextBox>
                            </td>--%>
                            <td colspan="2" style="text-align: left; margin-top: 10px;">
                                <asp:Label ID="lblCloneUDFNotice" runat="server" Text="Select target template where the selected UDF Fields are to be copied" CssClass="lbl" Style="text-wrap: normal; color: rgb(2, 132, 224);"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="text-align: left; margin-top: 10px;">
                                <asp:Label runat="server" ID="lblCloneCount" Text="No. of Fields to Be Cloned:"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="text-align: left; margin-top: 10px;">
                                <asp:Label ID="lblTableExistingPop" runat="server" Text=" "></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="lblBlotterPaddingRight">
                                <asp:Label ID="lblmoduleClone" CssClass="lbl" runat="server" Text="Target Module" Style="padding-left: 20px;"></asp:Label>
                            </td>
                            <td class="lblBlotterPaddingRight">
                                <asp:DropDownList ID="ddlmoduleClone" Width="240px" runat="server" CssClass="ddl" AutoPostBack="true"></asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td class="lblBlotterPaddingRight">
                                <asp:Label ID="lblSchemeClone" runat="server" CssClass="lbl" Text="Target Scheme" Style="padding-left: 20px;"></asp:Label></td>
                            <td class="ctlBlotterPaddingRight">
                                <asp:DropDownList ID="ddlSchemeClone" runat="server" CssClass="ddl" AutoPostBack="true" Width="240px"></asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td class="lblBlotterPaddingRight">
                                <asp:Label ID="lblTemplateClone" runat="server" CssClass="lbl" Text="Target Template" Style="padding-left: 20px;"></asp:Label></td>
                            <td class="ctlBlotterPaddingRight">
                                <asp:DropDownList ID="ddlTemplateClone" Width="240px" runat="server" CssClass="ddl" AutoPostBack="true"></asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Button runat="server" ID="btnViewTarget" CssClass="btn" Width="140px" Text="View Target Template" />
                            </td>
                            <td>
                                <asp:Button runat="server" ID="btnConfirmClone" CssClass="btn" Width="140px" Text="Clone Field(s)" />
                                <asp:Button runat="server" ID="btnCancelClone" CssClass="btn" Width="140px" Text="Close" OnClientClick="btnCancelClone_Click()" />
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>

    <asp:UpdatePanel ID="UpdatePanel5" runat="server" class="PanelPad">
        <ContentTemplate>
            <asp:Panel ID="pnlSubtemplateBackgroundClone" runat="server" CssClass="groupBoxGrids3SubTemplateclone"></asp:Panel>
            <asp:Panel ID="pnlSubtemplateClone" runat="server" CssClass="groupBoxGrids2">
                <fieldset class="MainFieldSet" style="margin: 10px; border: solid; border-width: 1px; border-color: #d3d3d3">
                    <table style="margin: 10px; border-spacing: 2px 8px;">
                        <tr>
                            <td style="text-align: left; margin-top: 20px;" colspan="2">
                                <asp:Label ID="lblSubTemplateerrorpop" runat="server" Text=" "></asp:Label>
                                <asp:HiddenField ID="hdnlblSubTemplateerrorpop" runat="server" ClientIDMode="Static" EnableViewState="true" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="text-align: left; margin-top: 10px;">
                                <asp:Label ID="lblSubTemplateCloneUDFNotice" runat="server" Text="Select target template where the selected UDF Fields are to be copied" CssClass="lbl" Style="text-wrap: normal; color: rgb(2, 132, 224);"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="text-align: left; margin-top: 10px;">
                                <asp:Label runat="server" ID="lblSubTemplateCloneCount" Text="No. of Fields to Be Cloned:"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="text-align: left; margin-top: 10px;">
                                <asp:Label ID="lblSubTemplateTableExistingPop" runat="server" Text=" "></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="lblBlotterPaddingRight">
                                <asp:Label ID="lblSubTemplateClone" runat="server" CssClass="lbl" Text="Target Sub Template"></asp:Label>
                            </td>
                            <td class="ctlBlotterPaddingRight">
                                <asp:DropDownList ID="ddlSubTemplateClone" CssClass="ddl" AutoPostBack="true" Style="width: 280px; padding: 10px" runat="server"></asp:DropDownList>
                            </td>
                        </tr>
                        <tr style="text-align: center;">
                            <%--<td>
                                <asp:Button runat="server" ID="btnSubTemplateViewTarget" CssClass="btn" Width="140px" Text="View Target Template" />
                            </td>--%>
                            <td colspan="2">
                                <asp:Button runat="server" ID="btnSubTemplateConfirmClone" CssClass="btn" Width="140px" Text="Clone Field(s)" />
                                <asp:Button runat="server" ID="btnSubTemplateCancelClone" CssClass="btn" Width="140px" Text="Close" OnClientClick="btnSubTemplateCancelClone_Click()" />
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="UpdatePanel3" runat="server" class="PanelPad">
        <ContentTemplate>
            <asp:Panel ID="pnlSubTemplateBackGround" runat="server" CssClass="groupBoxGrids3SubTemplate"></asp:Panel>
            <asp:Panel ID="pnlSubTemplate" runat="server" CssClass="groupBoxGrids2SubTemplate UCPGroupBoxGrid_popup">

                <table style="margin: 10px;">
                    <tr>
                        <td>
                            <lable>Sub Template</lable>
                            <asp:DropDownList runat="server" ID="ddlSubTemplate" CssClass="ddl" AutoPostBack="true" Style="width: 280px; padding: 10px"></asp:DropDownList>
                        </td>
                        <td>
                            <asp:Button runat="Server" ID="btnSaveSubTemplate" CssClass="btn" Text="Save" Width="130px" />
                            <asp:Button runat="Server" ID="btnDeleteSubTemplate" CssClass="btn" Text="Delete Fields" Width="130px"></asp:Button>                          
                            <asp:Button runat="Server" ID="btnCloseSubTemplate" CssClass="btn" Text="Close" Width="130px" OnClientClick="btnCloseSubTemplate_Click()" />
                            <asp:Button runat="Server" ID="btnCloneSubTemplateUDF" CssClass="btn" Text="Clone" Width="130px" />
                        </td>
                        <td>
                            <asp:Label ID="lblMessageSubTemplate" runat="server" CssClass="lblError" Text="" ForeColor="#0368B6" Style="margin-left: 10px"></asp:Label>
                            <asp:HiddenField ID="hdnLblMessageSubTemplate" runat="server" ClientIDMode="Static" EnableViewState="true" />
                        </td>
                        <td></td>
                    </tr>
                </table>

                <div id="Div1" style="margin-left: 10px; margin-top: 25px; padding-bottom: 50px;">

                    <asp:GridView ID="dgvMetaDataSubTemplate" runat="server" VerticalContentAlignment="Center" AutoGenerateColumns="False" CssClass="relative-grid Grid" AllowSorting="True" AllowPaging="true" PageSize="25" ShowHeaderWhenEmpty="True"
                        EmptyDataText="No Records Found" RowHeadersWidthSizeMode="DisableResizing;" SelectedRowStyle-Wrap="true" HeaderStyle-CssClass="GridHeaderTitle">

                        <SelectedRowStyle CssClass="GridItemSelect" />
                        <RowStyle CssClass="GridItem" />
                        <HeaderStyle CssClass="GridHeader" />
                        <FooterStyle CssClass="GridFooter" />
                        <PagerStyle CssClass="GridPager" />
                        <Columns>
                            <asp:TemplateField>
                                <HeaderStyle Wrap="true" HorizontalAlign="Center" VerticalAlign="Middle" />
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="false" />
                                <HeaderTemplate>
                                    <asp:CheckBox ID="chkAll" runat="server" onClick="checkallbox(this)" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="CheckRecord" runat="server" onClick="checkchanged(this)" />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Sr No" Visible="False">
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                <ItemTemplate>
                                    <asp:Label ID="lblSr_No" runat="server" Text='<%# Eval("Sr_No")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Name" ItemStyle-CssClass="CaptionWidth" HeaderStyle-CssClass="CaptionWidth">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle Wrap="True" />
                                <ItemTemplate>
                                    <asp:TextBox ID="TxtName" runat="server" onfocus="checkCurrentRecord(this);" Style="border: 0px solid !important;" Width="180px" Enabled="false" onKeypress="return onlyAlphaNumberDecimal(event, this)" Text='<%#Eval("Field_Name")%>'></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Display Name" ItemStyle-CssClass="CaptionWidth" HeaderStyle-CssClass="CaptionWidth">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle Wrap="True" />
                                <ItemTemplate>
                                    <asp:TextBox ID="TxtDisplayName" runat="server" onfocus="checkCurrentRecord(this);" BorderStyle="none" Width="180px" Style="border: 0px solid !important;" Text='<%#Eval("Field_Display_Name")%>'></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Data Type" ItemStyle-CssClass="DataSizeWidth" HeaderStyle-CssClass="DataSizeWidth">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:DropDownList ID="ddlDataType" Enabled="False" CssClass="ddl" runat="server" OnTextChanged="RowSelectedSubTemplate" AutoPostBack="true" EnableViewState="true" OnSelectedIndexChanged="ddlDataTypeSubTemplate_SelectedIndexChanged"></asp:DropDownList>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Data Size" ItemStyle-CssClass="DataSizeWidth" HeaderStyle-CssClass="DataSizeWidth">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle Wrap="True" />
                                <ItemTemplate>
                                    <asp:TextBox ID="txtDataSize" onfocus="checkCurrentRecord(this);" Enabled="False" runat="server" Width="110px" Style="border: 0px solid !important;" Text='<%# Eval("Data_Size")%>'></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Sourcing Link">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle Wrap="True" HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:DropDownList ID="ddlSourcingLink" CssClass="ddl" OnTextChanged="RowSelectedSubTemplate" runat="server" AutoPostBack="true" Width="120" autosizeItems="True" OnSelectedIndexChanged="ddlSourcingLinkSubTemplate_SelectedIndexChanged"></asp:DropDownList>
                                    <asp:TextBox ID="txtSourcingLink" runat="server" onfocus="checkCurrentRecord(this);" Style="border: 0px solid !important;" Text='<%#Eval("Reference")%>'></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Default" ItemStyle-CssClass="CaptionWidth1" HeaderStyle-CssClass="CaptionWidth1">
                                <HeaderStyle Wrap="True"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Left" Wrap="True" />
                                <ItemTemplate>
                                    <uc1:DateControl ID="txtDate" runat="server" OnTextChanged="RowSelectedSubTemplate" SetDefaultDate="false" ControlWidth="158" TextBoxPaddding="0" ButtonPaddding="5" CalenderCss="btn1" autopostback="true" width="190" text='<%#Eval("Field_Default_Value")%>' />
                                    <uc3:UC_DateTime ID="txtDateTime" runat="server" OnTextChanged="RowSelectedSubTemplate" CalenderCss="btn1" autopostback="true" width="190" text='<%#Eval("Field_Default_Value")%>' />
                                    <uc4:ShareCollection ID="txtSharecollection" runat="server" OnTextChanged="RowSelectedSubTemplate" ShareWidth="190" Text='<%#Eval("Field_Default_Value")%>' />
                                    <asp:DropDownList ID="ddlDefault" CssClass="ddl" OnTextChanged="RowSelectedSubTemplate" runat="server" AutoPostBack="true" Width="190"></asp:DropDownList>
                                    <asp:TextBox ID="TxtDefault" runat="server" onfocus="checkCurrentRecord(this);" Width="190" Style="border: 0px solid !important" Text='<%#Eval("Field_Default_Value")%>'></asp:TextBox>
                                    <asp:FileUpload ID="btnBrowse" type="file" size="52" name="clientfile" runat="server" Width="246px" Height="26px" />
                                    <%--<uc2:FilePathControl ID="FileUploadControl" runat="server" width="180" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Field_Default_Value").ToString)%>' />
                                    --%>
                                    <uc6:MultiSelect ID="ddlMultiDefault" OnSelectedIndexChanged="RowSelectedSubTemplate" EnableViewState="true" runat="server" isDropDownPostBack="true" />
                                    <uc7:UC_Time ID="txtTime" runat="server" OnTextChanged="RowSelected" width="158" text='<%#Eval("Field_Default_Value")%>'></uc7:UC_Time>
                                    <asp:LinkButton ID="lnk_TextArea" runat="server" Style="text-decoration: none; color: black" Visible="false" AutoPostBack="true" OnTextChanged="RowSelectedSubTemplate" OnClick="lnk_TextArea_Click" Text="SelectTextHere"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Format">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle Wrap="True" />
                                <ItemTemplate>
                                    <%--<asp:TextBox ID="txtFormat" Width="40px" runat="server" AutoPostBack="true" OnTextChanged="RowSelectedSubTemplate" Style="border: 0px solid !important;" Text='<%#Eval("UDF_Format")%>'></asp:TextBox>--%>
                                    <asp:DropDownList ID="ddlFormat" Width="60px" CssClass="ddl" onchange="checkCurrentRecord(this);" runat="server" Style="border: 0px solid !important;" Text='<%#Eval("UDF_Format")%>'>
                                        <asp:ListItem Text="" Value=""></asp:ListItem>
                                        <asp:ListItem Text="0" Value="0"></asp:ListItem>
                                        <asp:ListItem Text="1" Value="1"></asp:ListItem>
                                        <asp:ListItem Text="2" Value="2"></asp:ListItem>
                                        <asp:ListItem Text="3" Value="3"></asp:ListItem>
                                        <asp:ListItem Text="4" Value="4"></asp:ListItem>
                                        <asp:ListItem Text="5" Value="5"></asp:ListItem>
                                        <asp:ListItem Text="6" Value="6"></asp:ListItem>
                                        <asp:ListItem Text="7" Value="7"></asp:ListItem>
                                        <asp:ListItem Text="8" Value="8"></asp:ListItem>
                                        <asp:ListItem Text="9" Value="9"></asp:ListItem>
                                        <asp:ListItem Text="10" Value="10"></asp:ListItem>
                                        <asp:ListItem Text="11" Value="11"></asp:ListItem>
                                        <asp:ListItem Text="12" Value="12"></asp:ListItem>
                                        <asp:ListItem Text="13" Value="13"></asp:ListItem>
                                        <asp:ListItem Text="14" Value="14"></asp:ListItem>
                                        <asp:ListItem Text="15" Value="15"></asp:ListItem>
                                        <asp:ListItem Text="16" Value="16"></asp:ListItem>
                                        <asp:ListItem Text="17" Value="17"></asp:ListItem>
                                        <asp:ListItem Text="18" Value="18"></asp:ListItem>
                                        <asp:ListItem Text="19" Value="19"></asp:ListItem>
                                        <asp:ListItem Text="20" Value="20"></asp:ListItem>
                                    </asp:DropDownList>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Mandatory">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="ChkMandatory" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("Mandatory")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <%--Added by VijayH || 13-May-2022--%>
                            <asp:TemplateField HeaderText="Clone">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="ChkClone" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("Clone")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Visible">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="ChkDealEntry" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("Deal_Entry")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Read Only">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="ChkReadOnly" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("Read_Only")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Schedule Check">
                                <HeaderStyle CssClass="ChkColWidth"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" CssClass="ChkColWidth" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="ChkSchedule" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("ScheduleChk")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Interface Key">
                                <HeaderStyle CssClass="ChkColWidth"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" CssClass="ChkColWidth" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="ChkInterfaceKey" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("Interface_Key")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Mutation">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="ChkMutation" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%# Eval("Mutation")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Unique">
                                <HeaderStyle CssClass="ChkColWidth"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" CssClass="ChkColWidth" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="ChkUnique" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("Unique")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Concat">
                                <HeaderStyle CssClass="ChkColWidth"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" CssClass="ChkColWidth" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="ChkConcat" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("Concat")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Validation type" ItemStyle-CssClass="CaptionWidth1" HeaderStyle-CssClass="CaptionWidth1">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Left" Wrap="True" />
                                <ItemTemplate>
                                    <%--<asp:DropDownList ID="ddlValidation" Width="120px" CssClass="ddl" OnTextChanged="RowSelectedSubTemplate" runat="server" AutoPostBack="true" >--%>
                                    <uc6:MultiSelect ID="ddlValidation" OnSelectedIndexChanged="ddlValidation_SelectedIndexChanged" EnableViewState="true" runat="server" isDropDownPostBack="true" />
                                    <%-- Text='<%#Eval("UDF_Feature1")%>'--%>
                                    <%-- <asp:ListItem Text="" Value=""></asp:ListItem>
                                     <asp:ListItem Text="Allow Blank Date" Value="Allow Blank Date"></asp:ListItem>
                                    <asp:ListItem Text="Allow Negative" Value="Allow Negative"></asp:ListItem>
                                    <asp:ListItem Text="Width" Value="Width"></asp:ListItem>
                                    <asp:ListItem Text="Hybrid Input" Value="Hybrid Input"></asp:ListItem>
                                    <asp:ListItem Text="Length" Value="Length"></asp:ListItem>
                                    <asp:ListItem Text="LowerCase" Value="LowerCase"></asp:ListItem>
                                    <asp:ListItem Text="Multiselect Dropdown" Value="Multiselect Dropdown"></asp:ListItem>
                                      <asp:ListItem Text="No Blank Row" Value="NoBlankRow"></asp:ListItem>
                                    <asp:ListItem Text="Radio Button" Value="Radio Button"></asp:ListItem>
                                    <asp:ListItem Text="Railway Line" Value="Railway Line"></asp:ListItem>
                                    <asp:ListItem Text="Range Between" Value="Range Between"></asp:ListItem>
                                    <asp:ListItem Text="Show Picker" Value="Show Picker"></asp:ListItem>
                                    <asp:ListItem Text="Toggle Button" Value="Toggle Button"></asp:ListItem>
                                    <asp:ListItem Text="UpperCase" Value="UpperCase"></asp:ListItem>--%>

                                    <%--</asp:DropDownList>--%>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Validation SubType">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle />
                                <ItemTemplate>
                                    <asp:TextBox ID="txtSubValidation" Width="80px" onfocus="checkCurrentRecord(this);" Style="border: 0px solid !important;" runat="server" Text='<%#Eval("UDF_Feature2")%>'>
                                    </asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Interface Data type" ItemStyle-CssClass="DisplayWidth" HeaderStyle-CssClass="DisplayWidth">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle />
                                <ItemTemplate>
                                    <asp:DropDownList ID="ddlUDF_InterfaceLink_DataType" CssClass="ddl" runat="server" AutoPostBack="true" Style="border: 0px solid !important;" OnTextChanged="RowSelectedSubTemplate" OnSelectedIndexChanged="ddlUDF_InterfaceLink_DataType_Subtemp_SelectedIndexChanged" Text='<%#Eval("UDF_InterfaceLink_DataType")%>'>
                                        <asp:ListItem Text="TEXT" Value=""></asp:ListItem>
                                        <asp:ListItem Text="COMMON DATA" Value="COMMON DATA"></asp:ListItem>
                                    </asp:DropDownList>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Interface Data Sourcinglink" ItemStyle-CssClass="DisplayWidth" HeaderStyle-CssClass="DisplayWidth">
                                <HeaderStyle Wrap="True"></HeaderStyle>
                                <ItemStyle />
                                <ItemTemplate>
                                    <asp:DropDownList ID="ddlUDF_InterfaceLink_SourcingLink" CssClass="ddl" runat="server" AutoPostBack="true" Style="border: 0px solid !important;" OnTextChanged="RowSelectedSubTemplate" OnSelectedIndexChanged="ddlUDF_InterfaceLink_SourcingLink_Subtemp_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Interface Link" ItemStyle-CssClass="DisplayWidth" HeaderStyle-CssClass="DisplayWidth">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle />
                                <ItemTemplate>
                                    <asp:DropDownList ID="ddlInterfaceLink" onchange="checkCurrentRecord(this);" runat="server" CssClass="ddl" AutoPostBack="true" Width="120"></asp:DropDownList> <%--added onchange by OnkarE on 17-Jan-2022 JIRA:UBSKFSINT-123--%>
                                    <asp:TextBox ID="txtInterfaceLink" runat="server" onfocus="checkCurrentRecord(this);" Width="120px" Style="border: 0px solid !important;" Text='<%#Eval("Interface_Link")%>'>></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Helptext" ItemStyle-CssClass="DisplayWidth" HeaderStyle-CssClass="DisplayWidth" Visible="false">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle Wrap="True" />
                                <ItemTemplate>
                                    <asp:TextBox ID="txtHelptext" Width="120px" runat="server" onfocus="checkCurrentRecord(this);" Style="border: 0px solid !important;" Text='<%#Eval("UDF_HelpText")%>'></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Color">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle Wrap="True" />
                                <ItemTemplate>
                                    <asp:TextBox ID="txtColor" runat="server" Width="60px" onfocus="checkCurrentRecord(this);" Style="border: 0px solid !important;" Text='<%#Eval("UDF_Color")%>' />
                                    <cc1:ColorPickerExtender
                                        ID="Colorpickerextender1"
                                        TargetControlID="txtColor"
                                        Enabled="True"
                                        runat="server"></cc1:ColorPickerExtender>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="FontSize">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle Wrap="True" />
                                <ItemTemplate>
                                    <%--Added by VijayH on 07-02-2022 to disable Paste and allow only Numeric Values--%>
                                    <asp:TextBox ID="txtFontSize" Width="40px" runat="server" onfocus="checkCurrentRecord(this);" Style="border: 0px solid !important;" onpaste="return false" oncopy="return false" onKeypress="return AllowOnlyNumeric()"  Text='<%#Eval("UDF_FontSize")%>'></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Font Name">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle />
                                <ItemTemplate>
                                    <asp:DropDownList ID="ddlfontName" Width="120px" CssClass="ddl" onchange="checkCurrentRecord(this);" runat="server" Text='<%#Eval("UDF_FontName")%>'>
                                        <asp:ListItem Text="" Value=""></asp:ListItem>
                                        <asp:ListItem Text="Comic Sans MS" Value="Comic Sans MS"></asp:ListItem>
                                        <asp:ListItem Text="Fixed Width" Value="Fixed Width"></asp:ListItem>
                                        <asp:ListItem Text="Georgia" Value="Georgia"></asp:ListItem>
                                        <asp:ListItem Text="Helvetica" Value="Helvetica"></asp:ListItem>
                                        <asp:ListItem Text="Narrow" Value="Narrow"></asp:ListItem>
                                        <asp:ListItem Text="Sans Serif" Value="Sans Serif"></asp:ListItem>
                                        <asp:ListItem Text="Verdana" Value="Verdana"></asp:ListItem>
                                        <asp:ListItem Text="Wide" Value="Wide"></asp:ListItem>
                                    </asp:DropDownList>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Bold">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkbold" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("Bold")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Italic">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkItalic" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("Italic")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Underline">
                                <HeaderStyle Wrap="False" Font-Underline="true"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkUnderline" runat="server" onchange="checkCurrentRecord(this);" Enabled="true" Checked='<%#Eval("Underline")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Height">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle Wrap="True" />
                                <ItemTemplate>
                                    <%--Added by VijayH on 07-02-2022 to disable Paste and allow only Numeric Values--%>
                                    <asp:TextBox ID="txtFieldHeight" Width="40px" runat="server" onfocus="checkCurrentRecord(this);" Style="border: 0px solid !important;" onpaste="return false" oncopy="return false" onKeypress="return AllowOnlyNumeric()" Text='<%#Eval("Field_Height")%>'></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Label Width">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" Wrap="True" />
                                <ItemTemplate>
                                    <%--Added by VijayH on 07-02-2022 to disable Paste and allow only Numeric Values--%>
                                    <asp:TextBox ID="txtLabelWidth" Width="40px" runat="server" onfocus="checkCurrentRecord(this);" onpaste="return false" oncopy="return false"  onKeypress="return AllowOnlyNumeric()" Style="border: 0px solid !important;" Text='<%#Eval("Label_Width")%>'></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Column Width">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" Wrap="True" />
                                <ItemTemplate>
                                    <%--Added by VijayH on 07-02-2022 to disable Paste and allow only Numeric Values--%>
                                    <asp:TextBox ID="txtColumnWidth" Width="40px" runat="server" onfocus="checkCurrentRecord(this);" onpaste="return false" oncopy="return false"  onKeypress="return AllowOnlyNumeric()" Style="border: 0px solid !important;" Text='<%#Eval("Column_Width")%>'></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Custom Tab Reference" ItemStyle-CssClass="DisplayWidth" HeaderStyle-CssClass="DisplayWidth">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" Wrap="True" />
                                <ItemTemplate>
                                    <asp:TextBox ID="txtCustomTabReference" Width="80px" runat="server" onfocus="checkCurrentRecord(this);" Style="border: 0px solid !important;" Text='<%#Eval("UDF_CustomTab_Reference")%>'></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Active YN">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle Wrap="True" />
                                <ItemTemplate>
                                    <asp:DropDownList ID="ddlActiveYN" Width="40px" onchange="checkCurrentRecord(this);" class="dll" runat="server" Style="border: 0px solid !important;">
                                    </asp:DropDownList>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Created By" ItemStyle-CssClass="DisplayWidth" HeaderStyle-CssClass="DisplayWidth">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" Wrap="True" />
                                <ItemTemplate>
                                    <asp:Label ID="lblCreatedBy" Width="80px" runat="server" AutoPostBack="true" Style="border: 0px solid !important;" Text='<%# Eval("CreatedBy")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Created At" ItemStyle-CssClass="DisplayWidth" HeaderStyle-CssClass="DisplayWidth">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" Wrap="True" />
                                <ItemTemplate>
                                    <asp:Label ID="lblCreatedAt" Width="80px" runat="server" AutoPostBack="true" Style="border: 0px solid !important;" Text='<%#Eval("CreatedAt")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                        </Columns>
                        <SelectedRowStyle Wrap="True" />
                    </asp:GridView>
                </div>

                <div id="div_lblcode" class="PopupContainer" runat="server" autopostback="False" visible="true">
                    <table>
                        <tr></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>

                </div>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>

    <%--  03-12-19 Twinkle start--%>
    <asp:UpdatePanel ID="UpdatePanel4" runat="server" class="PanelPad">
        <ContentTemplate>
            <asp:Panel ID="pnlCreateSubTemplateBackground" runat="server" CssClass="groupBoxGrids3CreateSubTemplate"></asp:Panel>
            <asp:Panel ID="pnlCreateSubTemplate" runat="server" CssClass="groupBoxGrids2CreateSubTemplate UCPGroupBoxGrid_popup">
                <table style="margin-left: 15px; margin-top: 15px; margin-right: 15px">
                    <tr>
                        <td>
                            <lable>Sub Template Details</lable>
                        </td>
                    </tr>
                    <tr></tr>
                    <tr>
                        <td style="padding-top: 10px;">
                            <asp:Button runat="server" ID="btnLoadCreateSubTemplate" CssClass="btn" Text="Load" Width="90" />
                            <asp:Button runat="Server" ID="btnAddCreateSubTemplate" CssClass="btn" Text="Add" Width="90px" />
                            <asp:Button runat="Server" ID="btnSaveCreateSubTemplate" CssClass="btn" Text="Save" Width="90px" />
                            <asp:Button runat="server" ID="btnDeleteCreateSubTemplate" CssClass="btn" Text="Delete" Width="90px" class="DeleteContainer" />
                            <asp:Button runat="server" ID="btnCloseCreateSubTemplate" Text="Close" CssClass="btn" Width="90px" OnClientClick="btnCloseCreateSubTemplate_Click()" />
                            <asp:CheckBox runat="server" ID="chkIncludeDeactivated" Text="Include Deactivated" AutoPostBack="true" />
                        </td>
                        <td>
                            <asp:Label ID="lblMgsSuccessCreateSubTemplate" runat="server" CssClass="lblError" Style="margin-left: 10px"></asp:Label>
                        </td>
                    </tr>
                </table>
                <div id="Div2" style="margin-left: 15px; margin-top: 25px; padding-bottom: 50px; margin-right: 15px">
                    <asp:GridView ID="dgvMetaDataCreateSubTemplate" runat="server" VerticalContentAlignment="center" AutoGenerateColumns="false" CssClass="Grid" AllowSorting="true" AllowPaging="true"
                        PageSize="25" ShowHeaderWhenEmpty="true" EmptyDataText="No Records Found" RowHeadersWidthSizeMode="DisableResizing;" SelectedRowStyle-Wrap="true" HeaderStyle-CssClass="GridHeaderTitle">
                        <SelectedRowStyle CssClass="GridItemSelect" />
                        <RowStyle CssClass="GridItem" />
                        <HeaderStyle CssClass="GridHeader" />
                        <FooterStyle CssClass="GridFooter" />
                        <PagerStyle CssClass="GridPager" />
                        <Columns>

                            <asp:TemplateField>
                                <HeaderStyle Wrap="true" Width="50px" HorizontalAlign="Center" VerticalAlign="Middle" />
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="false" />
                                <HeaderTemplate>
                                    <asp:CheckBox ID="chkAllCreateSubTemp" runat="server" AutoPostBack="true" OnCheckedChanged="CheckUncheckAllCreateSubTemplate" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="CheckRecordCreateSubTemp" runat="server" AutoPostBack="true" OnCheckedChanged="CheckAllRecordsCreateSubTemplate" />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <%--<asp:TemplateField ItemStyle-CssClass="EditColWidth" HeaderStyle-CssClass="EditColWidth" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lnkEditFunc" runat="server" CausesValidation="false" CommandName="Edit" Text="Edit"></asp:LinkButton>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:LinkButton ID="lnkUpdateFunc" runat="server" CausesValidation="True"
                                        CommandName="Update" Text="Update"></asp:LinkButton>
                                    &nbsp;<asp:LinkButton ID="lnkCancelFunc" runat="server" CausesValidation="False"
                                        CommandName="Cancel" Text="Cancel"></asp:LinkButton>
                                </EditItemTemplate>
                            </asp:TemplateField>--%>

                            <asp:TemplateField HeaderText="Sr No" Visible="false">
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                <ItemTemplate>
                                    <asp:Label ID="lblSr_NoCreateSubTemp" runat="server" Text="" />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="ID" ItemStyle-CssClass="DataSizeWidth" HeaderStyle-CssClass="CaptionWidth">
                                <HeaderStyle Wrap="true" Width="60px" />
                                <ItemStyle Wrap="true" HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:Label ID="lblIDCreateSubTemp" Enabled="false" runat="server" Style="border: 0px solid !important;" Width="20px" Text='<%#Eval("TOM_ID")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Sub Template Code" ItemStyle-CssClass="DataSizeWidth" HeaderStyle-CssClass="CaptionWidth">
                                <HeaderStyle Wrap="true" />
                                <ItemStyle Wrap="true" />
                                <ItemTemplate>
                                    <asp:TextBox ID="txtSubTemplateCodeCreateSubTemp" runat="server" onfocus="checkCurrentRecord(this);" Style="border: 0px solid !important;" Width="300px" Enabled="false" onKeypress="return onlyAlphaNumberDecimal(event, this)" Text='<%#Eval("TOM_Sub_Template_Code")%>'></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Sub Template Name" ItemStyle-CssClass="DataSizeWidth" HeaderStyle-CssClass="CaptionWidth">
                                <HeaderStyle Wrap="true" />
                                <ItemStyle Wrap="true" />
                                <ItemTemplate>
                                    <asp:TextBox ID="txtSubTemplateNameCreateSubTemp" runat="server" onfocus="checkCurrentRecord(this);" Style="border: 0px solid !important;" ValidationGroup="" Width="300px" onKeypress="" Text='<%#Eval("TOM_Sub_Template_Name")%>'></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Active YN" ItemStyle-CssClass="DataSizeWidth" HeaderStyle-CssClass="CaptionWidth">
                                <HeaderStyle Wrap="true" />
                                <ItemStyle Wrap="true" HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:DropDownList ID="ddlActiveYN" Width="60px" onchange="checkCurrentRecord(this);" class="dll" runat="server" Style="border: 0px solid !important;">
                                        <asp:ListItem Text="N" Value="N"></asp:ListItem>
                                        <asp:ListItem Text="Y" Value="Y"></asp:ListItem>
                                    </asp:DropDownList>
                                    <%--<asp:TextBox ID="txtActiveYNCreateSubTemp" runat="server" Style="border: 0px solid !important;" Width="80px" Enabled="false" onKeypress="return onlyAlphaNumberDecimal(event, this)" Text='<%#Eval("TOM_Active_YN")%>'></asp:TextBox>--%>
                                </ItemTemplate>
                            </asp:TemplateField>

                        </Columns>
                        <SelectedRowStyle Wrap="true" />
                    </asp:GridView>
                </div>
            </asp:Panel>

        </ContentTemplate>
    </asp:UpdatePanel>



    <%--Added By MohitM on 27-May-2022--%>
    <asp:UpdatePanel ID="UpdatePanel6" runat="server" class="PanelPad">
        <ContentTemplate>
            <asp:Panel ID="pnlAuditTrailBackGround" runat="server" CssClass="groupBoxGrids3SubTemplate"></asp:Panel>
            <asp:Panel ID="pnlAuditTrail" runat="server" CssClass="groupBoxGrids2SubTemplate UCPGroupBoxGrid_popup">
                <table style="margin: 10px;">
                    
                    <tr>
                        <td>
                             
                            <lable>Records</lable>
                            <asp:DropDownList runat="server" ID="ddlAuditTrailRecord" CssClass="ddl" AutoPostBack="true" Style="width: 280px; padding: 10px">
                                <asp:ListItem Text="Last 1 Hour" Value="1"></asp:ListItem>
                                <asp:ListItem Text="Last 5 Hour" Value="2"></asp:ListItem>
                                <asp:ListItem Text="Last 1 Day" Value="3"></asp:ListItem>
                                <asp:ListItem Text="Last 5 Day" Value="4"></asp:ListItem>
                                <asp:ListItem Text="Last 1 Month" Value="5"></asp:ListItem>
                                <asp:ListItem Text="All" Value="6"></asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td>
                            
                                                    
                            <asp:Button runat="Server" ID="btnCloseAuditTrail" CssClass="btn" Text="Close" Width="130px" OnClientClick="btnCloseAuditTrail_Clicked()" />
                            
                        </td>
                        <td>
                            <asp:Label ID="lblMessageAuditTrail" runat="server" CssClass="lblError" Text="" ForeColor="#0368B6" Style="margin-left: 10px"></asp:Label>
                            <asp:HiddenField ID="hdnLblMessageAuditTrail" runat="server" ClientIDMode="Static" EnableViewState="true" />
                           
                        </td>
                        <td>
                            <asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="UpdatePanel6"
                                DisplayAfter="0" >
                                <ProgressTemplate>
                                    <div id="loadingDiv2" class="divLoading loadingDiv" style="">
                                        <img alt="Loading" src="../App_Resources/loading.gif" style="height: 50px; z-index:9992;position:absolute !important" />
                                        <span class="lbl">Loading...
                                    </div>
                                    </span>
                                </ProgressTemplate>
                            </asp:UpdateProgress>
                        </td>
                    </tr>
                </table>

                <div id="DivAuditTrailGrd" style="margin-left: 10px; margin-top: 25px; padding-bottom: 50px;">

                    <asp:GridView ID="dgvMetaDataAuditTrail" runat="server" VerticalContentAlignment="Center" AutoGenerateColumns="False" CssClass="relative-grid Grid" AllowSorting="True" AllowPaging="true" PageSize="15" ShowHeaderWhenEmpty="True"   OnPageIndexChanging="AuditTrailIndexChanging"
                        EmptyDataText="No Records Found" RowHeadersWidthSizeMode="DisableResizing;" SelectedRowStyle-Wrap="true" HeaderStyle-CssClass="GridHeaderTitle">

                        <SelectedRowStyle CssClass="GridItemSelect" />
                        <RowStyle CssClass="GridItem" />
                        <HeaderStyle CssClass="GridHeader" />
                        <FooterStyle CssClass="GridFooter" />
                        <PagerStyle CssClass="GridPager" />
                        <Columns>
                            <%--<asp:TemplateField>
                                <HeaderStyle Wrap="true" HorizontalAlign="Center" VerticalAlign="Middle" />
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="false" />
                                <HeaderTemplate>
                                    <asp:CheckBox ID="chkAll" runat="server" onClick="checkallbox(this)" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="CheckRecord" runat="server" onClick="checkchanged(this)" />
                                </ItemTemplate>
                            </asp:TemplateField>--%>

                            <asp:TemplateField HeaderText="Audit Id" ItemStyle-CssClass="CaptionWidth" HeaderStyle-CssClass="CaptionWidth">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle Wrap="True" />
                                <ItemTemplate>
                                    <asp:Label ID="lblAuditId" runat="server" Text='<%# Eval("UMDL_AuditID")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Action Done At" ItemStyle-CssClass="CaptionWidth" HeaderStyle-CssClass="CaptionWidth">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle Wrap="true" />
                                <ItemTemplate>
                                    <asp:Label ID="lblAuditActionDoneAt" Width="80px" runat="server" Text='<%# Eval("UMDL_ActionDoneAt")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Action Done By" ItemStyle-CssClass="CaptionWidth" HeaderStyle-CssClass="CaptionWidth">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle Wrap="True" />
                                <ItemTemplate>
                                    <asp:Label ID="lblAuditActionDoneBy" runat="server" Text='<%# Eval("UMDL_ActionDoneBy")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Old New Flag" ItemStyle-CssClass="CaptionWidth" HeaderStyle-CssClass="CaptionWidth">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle Wrap="True" />
                                <ItemTemplate>
                                   <asp:Label ID="lblAuditOldNewflag" runat="server" Text='<%# Eval("UMDL_OldNewFlag")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Sr No" Visible="False">
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                <ItemTemplate>
                                    <asp:Label ID="lblAuditTrailSrNo" runat="server" Text='<%# Eval("Sr_No")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Name" ItemStyle-CssClass="CaptionWidth" HeaderStyle-CssClass="CaptionWidth">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle Wrap="True" />
                                <ItemTemplate>
                                    <asp:Label ID="lblAuditName" runat="server" Text='<%# Eval("Field_Name")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Display Name" ItemStyle-CssClass="CaptionWidth" HeaderStyle-CssClass="CaptionWidth">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle Wrap="True" />
                                <ItemTemplate>
                                    <asp:Label ID="lblAuditDisplayName" runat="server" Text='<%# Eval("Field_Display_Name")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Data Type" ItemStyle-CssClass="DataSizeWidth" HeaderStyle-CssClass="DataSizeWidth">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:Label ID="lblAuditDataType" runat="server" Text='<%# Eval("Field_FinIQ_Type")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                           <%-- <asp:TemplateField HeaderText="Data Size" ItemStyle-CssClass="DataSizeWidth" HeaderStyle-CssClass="DataSizeWidth">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle Wrap="True" />
                                <ItemTemplate>
                                    <asp:Label ID="lblDataSize" runat="server" Text='<%# Eval("Data_Size")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>--%>

                            <asp:TemplateField HeaderText="Sourcing Link">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle Wrap="True" HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:Label ID="lblAuditSourcingLink" runat="server" Text='<%# Eval("Reference")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Default" ItemStyle-CssClass="CaptionWidth1" HeaderStyle-CssClass="CaptionWidth1">
                                <HeaderStyle Wrap="True"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" Wrap="True" />
                                <ItemTemplate>
                                  <asp:Label ID="lblAuditDefault" runat="server" Text='<%# Eval("Field_Default_Value")%>'></asp:Label>
                                    </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Format">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle Wrap="True" HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:Label ID="lblAuditFormat" runat="server" Text='<%# Eval("UDF_Format")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Mandatory">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="ChkAuditMandatory" runat="server"  Enabled="false" Checked='<%#Eval("Mandatory")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Clone">
                            <HeaderStyle Wrap="False"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:CheckBox ID="ChkClone" runat="server"  Enabled="false" Checked='<%#Eval("Clone")%>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                            <asp:TemplateField HeaderText="Visible">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="ChkAuditDealEntry" runat="server"  Enabled="false" Checked='<%#Eval("Deal_Entry")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Read Only">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="ChkAuditReadOnly" runat="server"  Enabled="false" Checked='<%#Eval("Read_Only")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Schedule Check">
                                <HeaderStyle CssClass="ChkColWidth"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" CssClass="ChkColWidth" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="ChkAuditSchedule" runat="server"  Enabled="false" Checked='<%#Eval("ScheduleChk")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Interface Key">
                                <HeaderStyle CssClass="ChkColWidth"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" CssClass="ChkColWidth" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="ChkAuditInterfaceKey" runat="server"  Enabled="false" Checked='<%#Eval("Interface_Key")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Mutation">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="ChkAuditMutation" runat="server"  Enabled="false" Checked='<%# Eval("Mutation")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Unique">
                                <HeaderStyle CssClass="ChkColWidth"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" CssClass="ChkColWidth" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="ChkAuditUnique" runat="server"  Enabled="false" Checked='<%#Eval("Unique")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Concat">
                                <HeaderStyle CssClass="ChkColWidth"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" CssClass="ChkColWidth" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="ChkAuditConcat" runat="server"  Enabled="false" Checked='<%#Eval("Concat")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Validation type" ItemStyle-CssClass="CaptionWidth1" HeaderStyle-CssClass="CaptionWidth1">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" Wrap="True" />
                                <ItemTemplate>
                                   <asp:Label ID="lblAuditValidationType" runat="server" Text='<%# Eval("UDF_Feature1")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Validation SubType">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:Label ID="lblAuditValidationSubType" runat="server" Text='<%# Eval("UDF_Feature2")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Interface Data Type" ItemStyle-CssClass="DisplayWidth" HeaderStyle-CssClass="DisplayWidth">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    
                                   <asp:Label ID="lblAuditInterfaceDataType" runat="server" Text='<%# Eval("UDF_InterfaceLink_DataType")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Interface Data Sourcinglink" ItemStyle-CssClass="DisplayWidth" HeaderStyle-CssClass="DisplayWidth">
                                <HeaderStyle Wrap="True"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:Label ID="lblAuditInterfaceDataSourcinglink" runat="server" Text='<%# Eval("UDF_InterfaceLink_SourcingLink")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Interface Link" ItemStyle-CssClass="DisplayWidth" HeaderStyle-CssClass="DisplayWidth">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:Label ID="lblAuditInterfaceLink" runat="server" Text='<%# Eval("InterFace_Link")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Helptext" ItemStyle-CssClass="DisplayWidth" HeaderStyle-CssClass="DisplayWidth" Visible="false">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" Wrap="True" />
                                <ItemTemplate>
                                    <asp:Label ID="lblAuditHelpText" runat="server" Text='<%# Eval("UDF_HelpText")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Color">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" Wrap="True" />
                                <ItemTemplate>
                                    <asp:Label ID="lblAuditColor" runat="server" Text='<%# Eval("UDF_Color")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="FontSize">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" Wrap="True" />
                                <ItemTemplate>
                                    <asp:Label ID="lblAuditFontSize" runat="server" Text='<%# Eval("UDF_FontSize")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Font Name">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                      <asp:Label ID="lblAuditFontName" runat="server" Text='<%# Eval("UDF_FontName")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Bold">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkAuditbold" runat="server"  Enabled="false" Checked='<%#Eval("Bold")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Italic">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkAuditItalic" runat="server"  Enabled="false" Checked='<%#Eval("Italic")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Underline">
                                <HeaderStyle Wrap="False" Font-Underline="true"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkAuditUnderline" runat="server"  Enabled="false" Checked='<%#Eval("Underline")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Height">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" Wrap="True" />
                                <ItemTemplate>
                                    <asp:Label ID="lblAuditHeight" runat="server" Text='<%# Eval("Field_Height")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Label Width">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" Wrap="True" />
                                <ItemTemplate>
                                    <asp:Label ID="lblAuditWidth" runat="server" Text='<%# Eval("Label_Width")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Column Width">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" Wrap="True" />
                                <ItemTemplate>
                                   <asp:Label ID="lblAuditColumnWidth" runat="server" Text='<%# Eval("Column_Width")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Custom Tab Reference" ItemStyle-CssClass="DisplayWidth" HeaderStyle-CssClass="DisplayWidth">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" Wrap="True" />
                                <ItemTemplate>
                                    <asp:Label ID="lblAuditCustomTabReference" runat="server" Text='<%# Eval("UDF_CustomTab_Reference")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Active YN">
                                <HeaderStyle Wrap="true"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" Wrap="True" />
                                <ItemTemplate>
                                   <asp:Label ID="lblAuditActiveYN" runat="server" Text='<%# Eval("Active_YN")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Created By" ItemStyle-CssClass="DisplayWidth" HeaderStyle-CssClass="DisplayWidth">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" Wrap="True" />
                                <ItemTemplate>
                                    <asp:Label ID="lblAuditCreatedBy" Width="80px" runat="server" AutoPostBack="true" Style="border: 0px solid !important;" Text='<%# Eval("CreatedBy")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Created At" ItemStyle-CssClass="DisplayWidth" HeaderStyle-CssClass="DisplayWidth">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" Wrap="True" />
                                <ItemTemplate>
                                    <asp:Label ID="lblAuditCreatedAt" Width="80px" runat="server" AutoPostBack="true" Style="border: 0px solid !important;" Text='<%#Eval("CreatedAt")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                        </Columns>
                        <SelectedRowStyle Wrap="True" />
                    </asp:GridView>
                </div>

                <div id="div3" class="PopupContainer" runat="server" autopostback="False" visible="true">
                    <table>
                        <tr></tr>
                        <tr>
                            <td style="padding-left: 25px">
                                <asp:Button ID="btnAuditOk" runat="server" CssClass="btn" Width="90px" Text="OK" OnClientClick=" return true;" />
                            </td>
                            <td>
                                <asp:Button ID="btnAuditCancel" runat="server" CssClass="btn" Width="90px" Text="Cancel" />
                            </td>
                        </tr>
                    </table>
                </div>
                </div>
                
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>

    <asp:HiddenField ID="hdnMetaDataSessionID" runat="server" Value="0" />

    <%--   Twinkle end--%>

    <asp:Button ID="btnPostBack" runat="server" CssClass="displayNone" />
    <script type="text/javascript">
        var confo
        function Confirm() {

            confo = $("#dialog_Confirm").dialog({
                title: 'Default Value',
                modal: true,
                autoOpen: false,
                width: 500,
                height: 500,
                close: function () {
                    confo.dialog('close');
                }
                , open: function () {
                    $(this).find("#iFrame_Reconfirm").prop("src", "FrmTextArea.aspx");
                }
            });

            //confo.dialog('open');
            //confo.dialog('close');
        }

        $('document').ready(function () {
            Confirm();
        });

        function closeDia() {
            document.getElementById('<%=btnPostBack.ClientID%>').click();
        }

        function isNumberKey(evt) {
            var charCode = (evt.which) ? evt.which : evt.keyCode;
            if (charCode > 31 && (charCode < 48 || charCode > 57))
                return false;
            return true;
        }

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

        function RowSelected(txtany, event) {
            try {
                alert(10)
                var x = $(txtCustCtl).attr("id");
                var i = $("#" + x).parent().getElementById("dgvMetaData").selectedIndex
            }
            catch (er) { }
        }

        //Added by TejaswiniB For Row selected checkbox checked on fileupload image selection - 21-Aug-2019
        function RowSelectedImage(txtany, event) {
            var id = "#" + txtany.id.substring(0, txtany.id.length - 10) + "_CheckRecord";
            $(id)[0].checked = true;
        }
        //END

        //Added by BhagyashriB on 07-Apr-2021 for btnCloseSubTemplate click event and avoit postback
        function btnSubTemplate_clicked() {
            //debugger;
            document.getElementById('<%= pnlSubTemplateBackGround.ClientID %>').style.display = "block";
            document.getElementById('<%= pnlSubTemplate.ClientID %>').style.display = "block";
            document.getElementById('<%= hdnpnlsubtemplatevisible.ClientID %>').value = true;
        }

        //Added by MohitM
        function btnAuditTrail_clicked() {
            
            document.getElementById('<%= pnlAuditTrailBackGround.ClientID %>').style.display = "block";
            document.getElementById('<%= pnlAuditTrail.ClientID %>').style.display = "block";
            document.getElementById('<%= hdnpnlaudittrailvisible.ClientID %>').value = true;
        }

        function btnCloseSubTemplate_Click() {
            // debugger;
            document.getElementById('<%= hdnLblMessageSubTemplate.ClientID %>').value = "";
            document.getElementById('<%= pnlSubTemplateBackGround.ClientID %>').style.display = "none";
            document.getElementById('<%= pnlSubTemplate.ClientID %>').style.display = "none";
            document.getElementById('<%= pnlCreateSubTemplateBackground.ClientID %>').style.display = "none";
            document.getElementById('<%= pnlCreateSubTemplate.ClientID %>').style.display = "none";
            document.getElementById('<%= hdnpnlsubtemplatevisible.ClientID %>').value = false;
            document.getElementById('<%= txtRowsPerPage.ClientID %>').value = 99;        //Added by BhagyashriB on 26-Aug-2021 | as discussed with RohitP
        }

        //Added By MohitM
        function btnCloseAuditTrail_Clicked() {
            
            document.getElementById('<%= hdnLblMessageAuditTrail.ClientID %>').value = "";
             document.getElementById('<%= pnlAuditTrailBackGround.ClientID %>').style.display = "none";
             document.getElementById('<%= pnlAuditTrail.ClientID %>').style.display = "none";
             document.getElementById('<%= pnlCreateSubTemplateBackground.ClientID %>').style.display = "none";
         }

        function btnOpenSubTemplateDetails_clicked() {
            document.getElementById('<%= pnlSubTemplate.ClientID %>').disabled = true;
            document.getElementById('<%= pnlCreateSubTemplateBackground.ClientID %>').style.display = "block";
            document.getElementById('<%= pnlCreateSubTemplate.ClientID %>').style.display = "block";
            document.getElementById('<%= hdnpnlCreateSubTemplatevisible.ClientID %>').value = true;
        }

        function btnCloseCreateSubTemplate_Click() {
            //   debugger;
            document.getElementById('<%= pnlSubTemplate.ClientID %>').disabled = false;
            document.getElementById('<%= pnlCreateSubTemplate.ClientID %>').style.display = "none";
            document.getElementById('<%= pnlCreateSubTemplateBackground.ClientID %>').style.display = "none";
            document.getElementById('<%= hdnpnlCreateSubTemplatevisible.ClientID %>').value = false;
            //document.getElementById('<%= btnSubTemplate.ClientID %>').click(); //commented by Devesh as button is put on main screen 

        }

        function checkallbox(element) {
            //
            //debugger;
            if (element.checked) {

                $(element).parent().parent().parent().parent().find("[id*=CheckRecord]").each(function () {
                    $(this).prop('checked', true);
                });
            } else {
                $(element).parent().parent().parent().parent().find("[id*=CheckRecord]").each(function () {
                    $(this).prop('checked', false);
                });
            }

        }

        function checkchanged(element) {
            //
            if ($(element).parent().parent().parent().parent().find("[id*=CheckRecord]:checked").length === $(element).parent().parent().parent().find("[id*=CheckRecord]").length) {

                $(element).parent().parent().parent().parent().find("[id*=chkAll]").each(function () {
                    $(this).prop('checked', true);
                });
            } else {
                $(element).parent().parent().parent().parent().find("[id*=chkAll]").each(function () {
                    $(this).prop('checked', false);
                });
            }
        }

        function btnCloneUDF_Clicked() {        //Added by BhagyashriB on 15-July-2021
            document.getElementById('<%= pnlBackground.ClientID %>').style.display = "block";
            document.getElementById('<%= pnlCloneField.ClientID %>').style.display = "block";
            document.getElementById('<%= hdnpnlCloneFieldVisible.ClientID %>').value = true;
        }

        function btnCancelClone_Click() {        //Added by BhagyashriB on 15-July-2021
            document.getElementById('<%= hdnlblerrorpop.ClientID %>').value = "";
            document.getElementById('<%= pnlBackground.ClientID %>').style.display = "none";
            document.getElementById('<%= pnlCloneField.ClientID %>').style.display = "none";
            document.getElementById('<%= hdnpnlCloneFieldVisible.ClientID %>').value = false;
        }

        function btnCloneSubTemplateUDF_Clicked() {
            document.getElementById('<%= pnlSubtemplateClone.ClientID %>').style.display = "block";
            document.getElementById('<%= pnlSubtemplateBackgroundClone.ClientID %>').style.display = "block";
            document.getElementById('<%= hdnpnlSubtemplateCloneVisible.ClientID %>').value = true;
        }

        function btnSubTemplateCancelClone_Click() {
            document.getElementById('<%= hdnlblSubTemplateerrorpop.ClientID %>').value = "";
            document.getElementById('<%= pnlSubtemplateBackgroundClone.ClientID %>').style.display = "none";
            document.getElementById('<%= pnlSubtemplateClone.ClientID %>').style.display = "none";
            document.getElementById('<%= hdnpnlSubtemplateCloneVisible.ClientID %>').value = false;
        }

        function checkCurrentRecord(element) {
            //   debugger;
            $(element).parent().parent().find("[id*=CheckRecord]")[0].checked = true;
            let lblMgsSuccessCreateSubTemplate = document.getElementById('<%= lblMgsSuccessCreateSubTemplate.ClientID %>');
            lblMgsSuccessCreateSubTemplate.innerText = "";              //Added by BhagyashriB on 04-Oct-2021 | UWI-193
        }
        //End by BhagyashriB 0n 07-Apr-2021

    </script>

    <div class="PopupCcy" onblur="javascript:$('.PopupCcy').toggle();"></div>
    <div id="loader" class="center"></div>  <%-- Added by BhagyashriB on 23-Nov-2021 | UWI-209 --%>

    <script type="text/javascript">
        // SetDropdownPopup();
        function SetDropdownPopup() {
            $(".PopupCcy").hide();
            var SelectedID;
            $('select.ddl[id$="ddlDataType"]').on("click", function (e) {
                try {
                    SelectedID = e.currentTarget;
                    $(".PopupCcy").html('');
                    cList = $('<table title="' + SelectedID.id + '" id="tblSelectOptions" /> ');
                    var tr;
                    $("#" + SelectedID.id + ">option[value!='']").each(function (i, opt) {
                        opt = $(this);

                        if (i % 5 == 0) {
                            tr = $('<tr/>').appendTo(cList);
                        }

                        if (this.text != '') {
                            var td = $('<td/>').appendTo(tr)
                                .text(this.text)
                                .on("click", function (that, event) {
                                    Dropdown_ChangeIndex($("#tblSelectOptions").attr("title"), $(this).text());
                                }).css({ "background-image": "url('../App_Resources/DataTypes/FinIQ_" + this.text.replace("/", "_") + ".png')" })
                        }
                    });
                    cList.appendTo(".PopupCcy");
                    popupPlot(e);
                } catch (er) { }
            });
        }

        function Dropdown_ChangeIndex(ddlID, ddlText) {
            $('#' + ddlID).val(ddlText);
            $(".PopupCcy").toggle();
            $(".PopupCcy").html('');
            $('#' + ddlID).trigger('change');
        }

        function popupPlot(e) {
            try {
                var x = e.currentTarget.offsetParent.offsetLeft + e.currentTarget.offsetParent.offsetWidth + 40;
                var y = e.pageY + e.target.offsetTop; // e.currentTarget.offsetParent.offsetTop + 40;
                $(".PopupCcy").toggle();
                $(".PopupCcy").css("left", Number(x) + "px");
                $(".PopupCcy").css("top", (Number(y)) + "px");
                $(".PopupCcy").css("margin", "");
            } catch (er) { }
        }

        function popupPlot1(e) {
            try {
                var x = e.pageX + e.currentTarget.offsetWidth;   // + e.target.offsetWidth;// e.pageX - e.target.offsetLeft;
                var y = e.pageY + e.target.offsetTop; //e.pageY - e.target.offsetTop; 
                $(".PopupCcy").show();
                $(".PopupCcy").css("left", Number(x) + "px");
                $(".PopupCcy").css("top", (Number(y)) + "px");
                $(".PopupCcy").css("margin", "");
            } catch (er) { alert(er.message); }
        }

    </script>

    <%-- Twinkle start--%>
    <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$btnDeleteCreateSubTemplate").click();
                                $(this).dialog('close');

                            },
                            'No': function () {
                                $(this).dialog('close');
                                $('html').find("#dialog").remove();
                                return false;
                            }
                        }
                    });
            }
            return dialogConfirmed;
            $(".ui-widget-overlay").height($("body").height());
        }


    </script>
    <%-- twinkle end--%>
</asp:Content>
