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


<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script src="../FinIQJS/SortFilter_Grid.js"></script>
    <%--<link href="App_Themes/Style1.css" rel="stylesheet" type="text/css" />--%>
    <asp:ScriptManagerProxy ID="ScriptManagerProxy21" runat="server">
    </asp:ScriptManagerProxy>
    <style type="text/css">
        .ui-widget.ui-widget-content {
            border: solid 1px #DDDDDD !important;
            padding: 5px !important;
        }

        .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
            float: none !important;
            text-align: center !important;
        }

        .ui-dialog .ui-dialog-buttonpane button {
            border: solid 1px #DDDDDD !important;
            height: 32px !important;
            margin: 0px 5px !important;
            width: 60px !important;
        }

        /* KavyaD || 7thJan2021 || MASINT-1084 */
        fieldset {
            border: solid 1px #dddddd;
        }

        .tableContent {
            width: 100%;
        }

        .divgrid {
            display: grid;
            grid-template-columns: 1fr 3fr;
            gap: 0;
            position: relative;
        }

        .tdHidden {
            display: none;
        }

        .txtEditItem {
            width: -webkit-fill-available;
        }

        .Grid {
            outline: none;
        }

            .GridItem td, .Grid td {
                border: solid 1px #DDDDDD !important;
            }

        input[type="submit"]:focus, .btn:focus, input[type="checkbox"]:focus {
            border: solid 1px #CCCCCC !important;
            color: #000000 !important;
            background-color: #fffdfd !important;
            box-shadow: 0px 0px 5px 2px #ddd !important;
        }

        .lnkexport:focus {
            outline: solid 1px #CCCCCC !important;
        }
        /*<%--Added by Madhuri G on 03-Jan-2022 || JIRA MASINT - 2383--%>*/
          .DataType {
            grid-column-start: 3;
            grid-column-end: 4;
        }
          /*End(03-Jan-2022) || MASINT - 2383 */
      
    </style>
    <%--POP-UP CSS--%>
    <style>
        .ui-button {
            border: none !important;
            margin-top: -14px !important;
        }

        .field_set {
        }

        .btnClose {
            width: 30px;
            float: right;
        }

        #Div1 {
            position: absolute !important;
            background-color: #f9f9f9;
            left: 35vw;
            top: 17vw;
            /*height: 13vw !important;*/
            width: 30vw !important;
            text-align: -webkit-center;
            padding: 1vw;
            border-radius: 8px;
            box-shadow: 0 0 4px #cccccc;
        }
      
    </style>
    <div style="width: 100%; height: 20px; margin-top: -15px;" class="row">
        <div class="col">
        </div>
        <div class="col">
            <asp:UpdatePanel ID="UpnlMessages" runat="server">
                <ContentTemplate>
                    <table class="tableContent">
                        <tr>
                            <td>
                                <asp:Label ID="lblError" runat="server" CssClass="lblerror" Style="color: #FF4E4E !important;"></asp:Label>
                                <%--Start : - Changed By Rushikesh P on 25-Jun-2020 for Success message should be in green color--%>
                                <asp:Label ID="lblWarning" runat="server" Style="color: #0368B6 !important;" CssClass="lbl"></asp:Label>
                                <asp:Label ID="lblInfo" runat="server" Style="color: #008000 !important;" CssClass="lbl"></asp:Label>
                                <%--End : - Changed By Rushikesh P on 25-Jun-2020 for Success message should be in green color--%>
                                <asp:HiddenField ID="hdnExpandCollapse" runat="server" />
                                <asp:HiddenField ID="hdnEditYN" runat="server" />
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </div>
    <div>

        <div style="width: fit-content; border: solid 1px #dddddd; min-width: 90%;">
            <div class="row">
                <table class="tableContent">
                    <tr>
                        <td class="divgrid">
                            <div class="col">
                                <asp:UpdatePanel ID="UpdatePanelDT" runat="server" ChildrenAsTriggers="true">
                                    <ContentTemplate>
                                        <fieldset style="height: 645px">
                                            <legend class="lbl">Datatypes</legend>
                                            <table>
                                                <tr>
                                                    <td>
                                                        <table>
                                                            <tr>
                                                                <td>
                                                                    <input type="button" id="btnAddDatatype" onclick="openDailog()" value="Add New Datatype" class="btn" tabindex="1" style="width: 175px; margin-right: 11px;" runat="server" />
                                                                    <asp:Button ID="btnAddDT" runat="server" Text="Add New DataType" Visible="false" CssClass="btn" OnClientClick="openDailog();" />
                                                                    <asp:Button runat="server" Text="User Datatype Mapping" ID="BtnMap" CssClass="btn" TabIndex="2" Width="175px" />
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <table>
                                                            <tr>
                                                                <td>
                                                                    <asp:TextBox ID="txtSearchDT" runat="server" Width="175px" Style="margin-right: 11px;" TabIndex="3"></asp:TextBox>
                                                                </td>
                                                                <td>
                                                                    <asp:Button runat="server" Text="Find" ID="btnSearch" CssClass="btn" Width="85px" Style="margin-right: 1.2%" TabIndex="4" />
                                                                </td>
                                                                <td>
                                                                    <asp:Button runat="server" Text="All" ID="btnAll" CssClass="btn" Width="85px" Style="margin-right: 1.2%" TabIndex="5" />
                                                                </td>
                                                            </tr>
                                                        </table>

                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <%-- <asp:ListBox ID="lstDataTypes" runat="server" CssClass="lst" Width="292px" Height="368px"  TabIndex="8" OnSelectedIndexChanged="lstDataTypes_SelectedIndexChanged"></asp:ListBox>--%>
                                                        <asp:ListBox ID="lstDataTypes" runat="server" CssClass="lst" Width="375px" Height="537px" AutoPostBack="true" TabIndex="8"></asp:ListBox>
                                                    </td>
                                                </tr>

                                            </table>
                                        </fieldset>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </div>
                            <div class="col">

                                <asp:UpdatePanel ID="UpdatePanelDV" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional">
                                    <ContentTemplate>
                                        <fieldset style="width: auto; height: 610px">
                                            <legend class="lbl" id="datavalue">Datavalues</legend>
                                            <table class="tableContent">
                                                <tr>
                                                    <td>
                                                        <table class="tableContent">
                                                            <tr>
                                                                <td>
                                                                    <div style="display: grid; grid-template-columns:0.2fr auto 0.75fr;grid-row-gap: 10px;">
                                                                        <div class="col">
                                                                            <div class="row">
                                                                                <asp:RadioButtonList ID="rdSelectedAll" AutoPostBack="true" CssClass="radioButtonList" EnableTheming="False" GroupName="Filter" TabIndex="6" runat="server" RepeatDirection="Horizontal">
                                                                                    <asp:ListItem Selected="True" Value="Selected">Selected</asp:ListItem>
                                                                                    <asp:ListItem Value="All">All</asp:ListItem>
                                                                                </asp:RadioButtonList>
                                                                            </div>
                                                                        </div>
                                                                        <div class="col" >
                                                                            <div class="row" >
                                                                                <asp:Label ID="lblSelectedDataType" runat="server" CssClass="lbl" Text="Selected Data Type:"></asp:Label>
                                                                                <asp:Label ID="lblUser" runat="server" CssClass="lbl"></asp:Label>
                                                                            </div>
                                                                        </div>
                                                                        <%--Added by Madhuri G on 03-Jan-2022 || JIRA MASINT - 2383--%>
                                                                        <div class="col DataType">
                                                                            <div class="row">
                                                                                <asp:Label ID="lblRecordsPerPage" runat="server" Text="Records Per Page" CssClass="lbl" Style="margin-right: 15px; margin-left: 5px; "></asp:Label>
                                                                                <asp:TextBox ID="txtRecordsPerPage" runat="server" MaxLength="3" Style="width: 35px; text-align: right;" AutoPostBack="True" CssClass="txt" onkeypress="return isNumberKey(event)" Text="999"></asp:TextBox>                                                
                                                                            </div>
                                                                        </div>
                                                                        <%--End(03-Dec-2021)|| MASINT - 2383--%>
                                                                        <div class="col">
                                                                            <asp:Button ID="btnInsert" runat="server" Text="Add New Datavalue" CssClass="btn" TabIndex="8" Width="145px" />
                                                                        </div>
                                                                        <div class="col" >
                                                                            <div class="row">
                                                                                <asp:Button ID="btnSave" runat="server" Text="Save" CssClass="btn" TabIndex="10" Width="100px" Style="margin-right: 1.2%" />
                                                                                <asp:Button ID="btnDelete" runat="server" Text="Delete" CssClass="btn" TabIndex="12" Width="100px" Style="margin-right: 1.2%" Enabled="false" />
                                                                                <asp:Button ID="btnVerify" runat="server" CssClass="btn" TabIndex="11" Text="Verify" Width="100px" Style="margin-right: 1.2%" Visible="false" />
                                                                                <asp:Button ID="btnLoad" runat="server" CssClass="btn" TabIndex="9" Text="Load" Width="100px" Style="margin-right: 1.2%" />
                                                                                <asp:Button ID="btnCancel" runat="server" Text="Cancel" CssClass="btn" Visible="false" TabIndex="13" Width="100px" Style="margin-right: 1.2%" />
                                                                                <asp:Button ID="btnExtract" runat="server" CssClass="btn" TabIndex="16" Text="Extract" Width="100px" Style="margin-right: 1.2%" />
                                                                            </div>
                                                                        </div>
                                                                        <div class="col" runat="server" id="divExportExpand">
                                                                            <div class="row">
                                                                                <asp:LinkButton ID="lnkexport" TabIndex="14" ToolTip="Export to excel" CssClass="lnkexport" runat="server" Visible="true" Style="margin-right: 10px;border: none!important; box-shadow: none; background-color: white!important"><img src="../App_Resources/xls_Regula_Gray.png" alt="Export To Excel" style="max-width:34px !important;cursor: pointer!important;border:none!important;" class="btnExpandCollapse" /></asp:LinkButton>
                                                                                <asp:ImageButton runat="server" TabIndex="15" title="Expand / Collapse" CssClass="btnExpandCollapse" ID="btnExpandCollapsePortfolio" ImageUrl="~/App_Resources/Expand_Gray.png" OnClientClick="ExpandCollapseDiv(this); return false;" Style="border: none!important; max-width: 30px; cursor: pointer!important;"></asp:ImageButton>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                                <tr></tr>
                                                <tr>
                                                    <td>
                                                        <table>
                                                            <tr>
                                                                <td>
                                                                    <asp:GridView ID="grdDataTypes" runat="server" CellPadding="3" EmptyDataText="No data found." AutoGenerateColumns="False"
                                                                        PageSize="15" CssClass="Grid" AllowPaging="True" ShowHeaderWhenEmpty="true" AllowSorting="true" TabIndex="6" BorderColor="White" GridLines="Both">
                                                                        <SelectedRowStyle CssClass="GridItemSelect" />
                                                                        <RowStyle CssClass="GridItem" />
                                                                        <HeaderStyle CssClass="GridHeader" Font-Size="X-Small" BackColor="#f5f5f5" Font-Bold="False" ForeColor="White" HorizontalAlign="Center" />
                                                                        <FooterStyle CssClass="GridFooter" />
                                                                        <PagerStyle CssClass="GridPager" />
                                                                        <PagerSettings FirstPageText="First" LastPageText="Last" Mode="NumericFirstLast" Position="Bottom" />
                                                                        <Columns>
                                                                            <asp:TemplateField>
                                                                                <HeaderTemplate>
                                                                                    <%--<asp:CheckBox ID="chkAllItems" CssClass="gridCB" runat="server" OnCheckedChanged="chkAllItems_CheckedChanged" AutoPostBack="true" />--%>
                                                                                    <asp:CheckBox ID="chkAllItems" runat="server" AutoPostBack="false" onclick="checkAll(this);" Style="margin-left: 4px" />
                                                                                </HeaderTemplate>
                                                                                <ItemTemplate>
                                                                                    <%--<asp:CheckBox ID="cbSelect" CssClass="gridCB" runat="server" OnCheckedChanged="cbSelect_CheckedChanged" AutoPostBack="true"></asp:CheckBox>--%>
                                                                                    <asp:CheckBox ID="cbSelect" runat="server" AutoPostBack="false" onclick="checkChanged(this);" Style="margin-left: 4px"></asp:CheckBox>
                                                                                </ItemTemplate>
                                                                            </asp:TemplateField>
                                                                            <asp:CommandField ButtonType="Link" ShowEditButton="true" CancelText="Cancel" UpdateText=""
                                                                                EditText="Edit" HeaderStyle-Width="15px" ItemStyle-HorizontalAlign="Center"
                                                                                HeaderStyle-HorizontalAlign="Center"></asp:CommandField>
                                                                            <asp:TemplateField HeaderText="Data Type">
                                                                                <EditItemTemplate>
                                                                                    <asp:Label ID="lblData_Type" runat="server" Text='<%# Eval("Data_Type")%>'></asp:Label>
                                                                                </EditItemTemplate>
                                                                                <ItemTemplate>
                                                                                    <asp:Label runat="server" ID="lblData_Type" Text='<%# Eval("Data_Type")%>' Style="word-wrap: normal; word-break: break-all;"></asp:Label>
                                                                                </ItemTemplate>
                                                                            </asp:TemplateField>
                                                                            <asp:TemplateField HeaderText="CommonDataID" Visible="false">
                                                                                <ItemTemplate>
                                                                                    <asp:Label ID="lblCMID" runat="server" Text='<%# Eval("CommonData_ID")%>' Width="250px" Style="word-wrap: normal; word-break: break-all;"></asp:Label>
                                                                                </ItemTemplate>
                                                                            </asp:TemplateField>
                                                                            <asp:TemplateField HeaderText="Data Value">
                                                                                <EditItemTemplate>
                                                                                    <asp:TextBox ID="txtData_Value" CssClass="txtEditItem" runat="server" Text='<%# Eval("Data_Value")%>'></asp:TextBox>
                                                                                </EditItemTemplate>
                                                                                <ItemTemplate>
                                                                                    <asp:Label ID="lblData_Value" runat="server" Text='<%# Eval("Data_Value")%>' Width="250px" Style="word-wrap: normal; word-break: break-all;"></asp:Label>
                                                                                </ItemTemplate>
                                                                            </asp:TemplateField>
                                                                            <asp:TemplateField HeaderText="Long Name">
                                                                                <EditItemTemplate>
                                                                                    <asp:TextBox ID="txtMisc1" CssClass="txtEditItem" runat="server" Text='<%# Eval("Misc1")%>'></asp:TextBox>
                                                                                </EditItemTemplate>
                                                                                <ItemTemplate>
                                                                                    <asp:Label ID="lblMisc1" runat="server" Text='<%# Eval("Misc1")%>' Width="250px" Style="word-wrap: normal; word-break: break-all;"></asp:Label>
                                                                                </ItemTemplate>
                                                                            </asp:TemplateField>
                                                                            <asp:TemplateField HeaderText="Misc Info">
                                                                                <EditItemTemplate>
                                                                                    <asp:TextBox ID="txtMisc2" Width="60px" runat="server" Text='<%# Eval("Misc2")%>'></asp:TextBox>
                                                                                </EditItemTemplate>
                                                                                <ItemTemplate>
                                                                                    <asp:Label ID="lblMisc2" runat="server" Text='<%# Eval("Misc2")%>'></asp:Label>
                                                                                </ItemTemplate>
                                                                            </asp:TemplateField>
                                                                            <asp:TemplateField HeaderText="Entity" HeaderStyle-HorizontalAlign="Center" Visible="true" ItemStyle-CssClass="tdtoggle tdHidden">
                                                                                <HeaderStyle HorizontalAlign="Center" Wrap="true" Width="10px" CssClass="tdtoggle tdHidden" />
                                                                                <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle" Width="10px"></ItemStyle>
                                                                                <ItemTemplate>
                                                                                    <asp:Label ID="lblEntity" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.entity_name").ToString)%>' />
                                                                                </ItemTemplate>
                                                                                <EditItemTemplate>
                                                                                    <asp:DropDownList ID="ddlEntity" Width="120px" runat="server" CssClass="ddl" AutoPostBack="false"></asp:DropDownList>
                                                                                </EditItemTemplate>
                                                                            </asp:TemplateField>

                                                                            <asp:TemplateField HeaderText="Remark" ItemStyle-CssClass="tdtoggle tdHidden">
                                                                                <HeaderStyle HorizontalAlign="Center" Wrap="false" CssClass="tdtoggle tdHidden" />
                                                                                <%--  <EditItemTemplate>
                                                                                    <asp:TextBox ID="txtMisc3" CssClass="txtEditItem" runat="server" Text='<%# Eval("Misc3")%>'></asp:TextBox>
                                                                                </EditItemTemplate>--%>
                                                                                <ItemTemplate>
                                                                                    <asp:Label ID="lblMisc3" runat="server" Text='<%# Eval("Misc3")%>'></asp:Label>
                                                                                </ItemTemplate>
                                                                            </asp:TemplateField>
                                                                            <asp:TemplateField HeaderText="Updated by" ItemStyle-CssClass="tdtoggle tdHidden">
                                                                                <HeaderStyle HorizontalAlign="Center" Wrap="false" CssClass="tdtoggle tdHidden" />
                                                                                <ItemTemplate>
                                                                                    <asp:Label ID="lblUpdatedBy" runat="server" Text='<%# Eval("Updated_By")%>'></asp:Label>
                                                                                </ItemTemplate>
                                                                            </asp:TemplateField>
                                                                        </Columns>
                                                                    </asp:GridView>
                                                                </td>
                                                            </tr>
                                                        </table>

                                                    </td>
                                                </tr>
                                            </table>
                                        </fieldset>
                                    </ContentTemplate>
                                    <Triggers>
                                        <asp:PostBackTrigger ControlID="btnExtract" />
                                        <asp:PostBackTrigger ControlID="lnkexport" />
                                    </Triggers>
                                </asp:UpdatePanel>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    <div id="Div1" title="Common Data" style="display: none;">
        <asp:UpdatePanel ID="UPanle11111" runat="server" ChildrenAsTriggers="true">
            <ContentTemplate>
                <fieldset class="field_set">
                    <legend class="lbl">New Datatype</legend>
                    <div>
                        <asp:Button ID="btnCloseAccPopUp" runat="server" Text="X" OnClientClick="CloseDialog();return false;" Autopostback="false" CssClass="btn btnClose" />
                    </div>
                    <div style="margin-bottom: 3vw">
                        <%--<p class="validateTips" style="min-height: 10px; padding: 1px!important; margin-left: 0px; margin-right: 0px;"></p>--%>
                        <asp:TextBox ID="txtDataTypeName" runat="server" Width="220px"></asp:TextBox><br />
                    </div>
                    <div style="margin-top: 2vw">
                        <asp:Button ID="btnOK" runat="server" CssClass="btn" Text="Ok" Width="100px" OnClientClick="jsGetConfirmed();return false;" Autopostback="false" Style="margin-right: 10px;" />
                        <asp:Button ID="btnClose" runat="server" CssClass="btn" Text="Cancel" OnClientClick="CloseDialog();return false;" Autopostback="false" Width="100px" Style="margin-right: 10px;" />
                    </div>
                </fieldset>

            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    <input type="hidden" id="hdnconfo" runat="server" value="" />
    <script type="text/javascript">
        //var popupWin;
        //var dialog1 = $("#Div1").dialog({
        //    autoOpen: false,
        //    height: 180,
        //    width: 250,
        //    modal: true,
        //    //buttons: {
        //    //    Ok: jsGetConfirmed,
        //    //    Cancel: function () {

        //    //        dialog1.dialog("close");
        //    //    }
        //    //},
        //    close: function () {
        //        //reset all Controls
        //    }

        //});

        ////Added by Madhuri G || (03-Jan-2022) as informed by Kartik S
        ////JIRA : MASINT - 2383 : UCP Admin-Common Data page : Rows per page to be added

        function isNumberKey(evt) {
            var charCode = (evt.which) ? evt.which : evt.keyCode;
            if (charCode > 31 && (charCode < 48 || charCode > 57))
                return false;
            return true;
        }
        /////End(03-Jan-2022) || MASINT - 2383

        function CloseDialog() {
            $("#<%= txtDataTypeName.ClientID %>")[0].value = ""
            $("#Div1").hide();
        }

        function openDailog() {
            //dialog1.dialog("open");
            $("#<%= txtDataTypeName.ClientID %>")[0].value = ""
            $("#Div1").show();
        }

        function AllowBackSpace(txtDataTypeName, e) {
            var validateText = txtDataTypeName.value;
            var userText = validateText.toUpperCase();

            var n = txtDataTypeName.value.length
            if (e.keyCode === 8 && n > 0) {
                validateText = validateText.substring(0, n - 1);
                $("#ctl00_MainContent_txtDataTypeName").val(validateText);
            }
            return true;
        }
        function jsGetConfirmed() {
            $("#ctl00_MainContent_hdnconfo").val($("#ctl00_MainContent_txtDataTypeName").val());
            __doPostBack('GetConfirmed', '');
        }
        function disableControl(id) {
            document.getElementById(id).disabled = true;
        }
        function enableControl(id) {
            document.getElementById(id).disabled = false;
        }
        function windowOpener(url, name) {
            if (typeof (popupWin) != "object" || popupWin.closed) {
                popupWin = window.open(url, name);
            }
            else {
                popupWin.location.href = url;
            }
            popupWin.focus();
        }
        function btnDeleteClick() { }

        //KAvyaD || MASINT-1084
        function ExpandCollapseDiv(e) {
            $("#<%= grdDataTypes.ClientID %>").find('.tdtoggle').slideToggle(600)
            $("#<%=hdnExpandCollapse.ClientID%>")[0].value = ($("#<%=hdnExpandCollapse.ClientID%>").val() == 'Collapse' ? 'Expand' : 'Collapse')
        }


        function checkChanged(current) {
            $('#<%=lblError.ClientID %>')[0].innerText = " ";
            $('#<%=lblInfo.ClientID %>')[0].innerText = " ";
            $('#<%=lblWarning.ClientID %>')[0].innerText = " ";
            var inputList = $("#<%= grdDataTypes.ClientID %> input[id*='cbSelect']");
            var checked = 0;
            for (var i = 0; i < inputList.length; i++) {
                if ($(inputList[i]).is(':checked')) {
                    checked = checked + 1;
                    $("#<%= btnDelete.ClientID %>").prop('disabled', false);
                    $("#<%= btnExtract.ClientID %>").prop('disabled', false);
                    $("#<%= btnverify.ClientID %>").prop('disabled', false);
                }
            }
            if (checked == inputList.length)
                $("#<%= grdDataTypes.ClientID %> input[id*='chkAllItems']").prop("checked", true);
            else
                $("#<%= grdDataTypes.ClientID %> input[id*='chkAllItems']").prop("checked", false);

            if (checked > 0) $("#<%= btnAddDatatype.ClientID %>").prop('disabled', true);
            else {
                $("#<%= btnAddDatatype.ClientID %>").prop('disabled', false);
                $("#<%= btnload.ClientID %>").prop('disabled', false);
                $("#<%= btnverify.ClientID %>").prop('disabled', true);
                $("#<%= btnDelete.ClientID %>").prop('disabled', true);
                $("#<%= btnExtract.ClientID %>").prop('disabled', true);
            }
            return false;
        }

        function checkAll(chkAll) {
            $('#<%=lblError.ClientID %>')[0].innerText = " ";
            $('#<%=lblInfo.ClientID %>')[0].innerText = " ";
            $('#<%=lblWarning.ClientID %>')[0].innerText = " ";
            var inputList = $("#<%= grdDataTypes.ClientID %> input[id*='cbSelect']");
            if ($("#<%= grdDataTypes.ClientID %> input[id*='chkAllItems']").is(':checked') == true) {
                for (var i = 0; i < inputList.length; i++)
                    $(inputList[i]).prop("checked", true);
                $("#<%= btnAddDatatype.ClientID %>").prop('disabled', false);
                $("#<%= btnverify.ClientID %>").prop('disabled', false);
                $("#<%= btnDelete.ClientID %>").prop('disabled', false);
                $("#<%= btnExtract.ClientID %>").prop('disabled', false);
            }
            else {
                for (var i = 0; i < inputList.length; i++)
                    $(inputList[i]).prop("checked", false);
                $("#<%= btnverify.ClientID %>").prop('disabled', true);
                $("#<%= btnDelete.ClientID %>").prop('disabled', true);
                $("#<%= btnExtract.ClientID %>").prop('disabled', true);
            }
        }

        //KAvya || MASINT-1084
    </script>
</asp:Content>
