<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="RMWGenericFiltersAndSortingMetaData.aspx.vb" Inherits="FinIQWebApp.RMWGenericFiltersAndSortingMetaData" %>
<%@ Register Src="../FinIQ_User_Controls/MultiselectDropDown_Workbench/UC_MultiSelectDropDown_Workbench.ascx" TagPrefix="ucmulddl" TagName="UC_MultiSelectDropDown" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>RMW Generic Filters and Sorting Meta Data</title>
    <%--<script src="../FinIQJS/FinIQCommon.js" type="text/javascript"></script>--%>
    <link href="../App_Themes/Style1.css" rel="stylesheet" type="text/css" />
    <link href="RMWorkstationMetadata.css" rel="stylesheet" type="text/css" />
    <script src='<%=ResolveClientUrl("~/FinIQJS/external/jquery/jquery.min.js")%>'></script>
    <script src="../FinIQJS/FinIQCommon.js"></script>
</head>

<body onload="self.focus();">
    <style type="text/css">
        .CollpseCSS {
            margin-top: 5px;
            width: 100% !important;
            min-width: 780px !important;
            text-align: left;
            letter-spacing: normal;
        }

        .GridHeaderTitle11 {
            font-weight: bold !important;
            height: 40px !important;
        }

        .myAlign {
            text-align: center !important;
        }

        .linkButtonColour {
            color: #0284e0;
        }

        .myRowEditBgColor {
            background-color: #e7e7e7;
        }

        .GridItemSelect {
               background-color: #e7e7e7 !important; 
              
        }

        .GridItemSelect td a:link {
            color: #0284e0 !important;
        }

        /*Aditya B || 06-Oct-2021 || Added below CSS for action link-user group mapping pop-up || JIRA: MASCLI-1601 || Start */
        .groupBoxGrids {
            position: absolute !important;
            background-color: #f9f9f9;
            left: 744px;
            top: 205px;
            height: 305px !important;
            width: 404px !important;
            /*display: none;*/
        }

        .Visible {
            display: block;
        }

        .invisible {
            display: none;
        }

        .UserGrpPopup {
            z-index: 10000000 !important;
        }

        .overlaySearch {
            z-index: -1 !important;
            background-color: #000000 !important; /* Black background with opacity */
        }

        .MainFieldSet {
            width: 90% !important;
            border: none !important;
        }

        .txtUsername {
            width: 85px;
        }
        /*Aditya B || 06-Oct-2021 || Added below CSS for action link-user group mapping pop-up || JIRA: MASCLI-1601 || End */
    </style>
    
    <script type="text/javascript">
        <%--Aditya B || 06-Oct-2021 || For Action Link-User Group Mapping || JIRA: MASCLI-1601 || Start--%>
        function displayVisibleButtonGroupBox(RowP) {
            try {
                document.getElementById("overlayDiv").style.display = "block";
                $('#<%=dgvButton.ClientID%>').click();

                if ($('#ctl00_MainContent_grdActions').hasClass('frozenGrid') == true) {         //Added by Prateek M and Shekhar L on 18th Feb 2021 for header freezing fix for UBP - START
                    document.getElementById('<%=rowIndex1.ClientID%>').value = $(RowP).parent().parent().children().index($(RowP).parent());
                } else {
                    document.getElementById('<%=rowIndex1.ClientID%>').value = $(RowP).parent().parent().children().index($(RowP).parent()) - 1;
                }                                                                                           //Added by Prateek M and Shekhar L on 18th Feb 2021 for header freezing fix for UBP - END
                // alert($(RowP).parent().parent().children().index($(RowP).parent()) - 1)
                if (document.getElementById('<%=rowIndex1.ClientID%>').value >= 0) {
                    document.getElementById('<%=btnLoadGrp.ClientID%>').click();
                }
            }
            catch (ex) {
                console.log(ex);
            }
        }

        function EnterKeyEventUsergrp(evt) {
            try {
                if (evt.keyCode == 13) {
                    document.getElementById('<%=btnLoadGrp.ClientID%>').click();
                }
            }
            catch (ex) {
                console.log(ex);
            }
        }
        <%--Aditya B || 06-Oct-2021 || For Action Link-User Group Mapping || JIRA: MASCLI-1601 || End--%>

        <%--Aditya B || 11-Oct-2021 || For Action Link-Queue Status Mapping || JIRA: HSBCELINT-69 || Start--%>
        function displayVisibleQueueStatusBox(RowP) {
            try {
                document.getElementById("overlayDiv_QueueMapping").style.display = "block";
                $('#<%=btnQueueStatus.ClientID%>').click();

                if ($('#ctl00_MainContent_grdActions').hasClass('frozenGrid') == true) {         //Added by Prateek M and Shekhar L on 18th Feb 2021 for header freezing fix for UBP - START
                    document.getElementById('<%=rowIndex1.ClientID%>').value = $(RowP).parent().parent().children().index($(RowP).parent());
                } else {
                    document.getElementById('<%=rowIndex1.ClientID%>').value = $(RowP).parent().parent().children().index($(RowP).parent()) - 1;
                }                                                                                           //Added by Prateek M and Shekhar L on 18th Feb 2021 for header freezing fix for UBP - END
                // alert($(RowP).parent().parent().children().index($(RowP).parent()) - 1)
                if (document.getElementById('<%=rowIndex1.ClientID%>').value >= 0) {
                    document.getElementById('<%=btnLoadQueueStatus.ClientID%>').click();
                }
            }
            catch (ex) {
                console.log(ex);
            }
        }

        function EnterKeyEventQueueStatus(evt) {
            try {
                if (evt.keyCode == 13) {
                    document.getElementById('<%=btnLoadQueueStatus.ClientID%>').click();
                }
            }
            catch (ex) {
                console.log(ex);
            }
        }

        function checkAll(chkAll) {

            var GridView = chkAll.parentNode.parentNode.parentNode;
            var inputList = GridView.getElementsByTagName("input");

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

                var row = inputList[i].parentNode.parentNode;
                if (inputList[i].type == "checkbox" && chkAll != inputList[i]) {
                    if (chkAll.checked) {
                        inputList[i].checked = true;
                    }
                    else {
                        inputList[i].checked = false;
                    }
                }
            }
        }
        <%--Aditya B || 11-Oct-2021 || For Action Link-Queue Status Mapping || JIRA: HSBCELINT-69 || End--%>
    </script>
    
    <form id="form1" method="post" runat="server">
        <asp:ScriptManager ID="sm1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="Always">
            <ContentTemplate>
                <table style="width: 100%">
                    <tr>
                        <td>
                            <asp:Label ID="lblError" runat="server" Text="" ForeColor="#FF4E4E" />
                            <asp:Label ID="lblMsg" runat="server" Text="" ForeColor="#008000" />
                        </td>
                    </tr>

                    <tr>
                        <td>
                            <asp:Button ID="btnFilter" runat="server" Text="Workbench MetaData Filters" CssClass="btn btnCommon CollpseCSS " />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Panel ID="panelFilters" runat="server">
                                <div>
                                    <table>
                                        <tr>
                                            <td></td>
                                        </tr>
                                        <tr>
                                            <asp:Button ID="btnAdd" runat="server" CssClass="btn btnWidth" Text=" Add " />
                                        </tr>
                                        <tr>
                                            <td></td>
                                        </tr>
                                        <tr>
                                            <td dir="ltr">
                                                <div>
                                                    <%--Grid 1--%>
                                                    <asp:GridView ID="grdFilter" runat="server" CssClass="Grid" AutoGenerateColumns="false" AllowPaging="false" ShowHeaderWhenEmpty="true" EmptyDataText="No Data Found"
                                                        AllowSorting="true" EnableViewState="true" HeaderStyle-CssClass="GridHeaderTitle11">
                                                        <RowStyle CssClass="GridItem" />
                                                        <EditRowStyle CssClass="GridItemSelect"/>
                                                        <Columns>


                                                            <asp:TemplateField HeaderText="" Visible="false">
                                                                <ItemStyle HorizontalAlign="Center" Wrap="true" Width="20px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblFilterId" Text='<%# DataBinder.Eval(Container, "DataItem.RFM_ID")%>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="">
                                                                <ItemStyle HorizontalAlign="Center" Wrap="true" Width="20px" />
                                                                <ItemTemplate>
                                                                    <asp:CheckBox runat="server" ID="chkSelectSingleFilter" AutoPostBack="true" Width="20px" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="">
                                                                <HeaderStyle HorizontalAlign="Center" Width="90px" />
                                                                <ItemStyle HorizontalAlign="Center" Width="90px" />
                                                                <EditItemTemplate>
                                                                    <asp:LinkButton ID="btnUpdateFilter" runat="server" CommandName="Update" Width="33px" Text="Update" HorizontalAlign="Left"  />
                                                                    &nbsp;
                                                                    <asp:LinkButton ID="btnCancelFilter" runat="server" CommandName="Cancel" Width="33px" Text="Cancel" HorizontalAlign="Right" />
                                                                </EditItemTemplate>
                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="btnEditFilter" runat="server" CommandName="Edit" Text="Edit" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>


                                                            <asp:TemplateField HeaderText="Filter Name">
                                                                <HeaderStyle HorizontalAlign="Center" Width="130px" />
                                                                <ItemStyle HorizontalAlign="Left" Width="130px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblFilterName" Text='<%# DataBinder.Eval(Container, "DataItem.RFM_Filter_Name")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="ddlFilterName" Width="130px" CssClass="ddl">
                                                                    </asp:DropDownList>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Visible Y/N" ControlStyle-BorderStyle="None">
                                                                <HeaderStyle HorizontalAlign="Center" Width="70px" />
                                                                <ItemStyle HorizontalAlign="Center" Width="70px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblVisibleYNFilter" Text='<%# DataBinder.Eval(Container, "DataItem.RFM_Visible_YN")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="ddlVisibleYNFilter" Width="70px" CssClass="ddl">
                                                                        <asp:ListItem>Y</asp:ListItem>
                                                                        <asp:ListItem>N</asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>


                                                            <asp:TemplateField HeaderText="Display Name">
                                                                <HeaderStyle HorizontalAlign="Center" Width="130px" />
                                                                <ItemStyle HorizontalAlign="Left" Width="130px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblDisplayNameFilter" Text='<%# DataBinder.Eval(Container, "DataItem.RFM_Display_Name")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox runat="server" Visible="false" Width="130px" ID="txtDisplayNameFilter"></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>



                                                            <asp:TemplateField HeaderText="Target Field">
                                                                <HeaderStyle HorizontalAlign="Center" Width="180px" />
                                                                <ItemStyle HorizontalAlign="Left" Width="180px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblTargetFieldFilter" Text='<%# DataBinder.Eval(Container, "DataItem.RFM_Target_Field")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox runat="server" Visible="false" Width="180px" ID="txtTargetFieldFilter"></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Target Function">
                                                                <HeaderStyle HorizontalAlign="Center" Width="180px" />
                                                                <ItemStyle HorizontalAlign="Left" Width="180px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblTargetFunctionFilter" Text='<%# DataBinder.Eval(Container, "DataItem.RFM_Target_Function")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox runat="server" Visible="false" Width="180px" ID="txtTargetFunctionFilter"></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Search By" ControlStyle-BorderStyle="None">
                                                                <HeaderStyle HorizontalAlign="Center" Width="130px" />
                                                                <ItemStyle HorizontalAlign="Left" Width="130px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblSearchByFilter" Text='<%# DataBinder.Eval(Container, "DataItem.RFM_Search_By")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="ddlSearchByFilter" AutoPostBack="true" OnSelectedIndexChanged="ddlSearchByFilter_SelectedIndexChanged" Width="130px" CssClass="ddl">
                                                                        <asp:ListItem>DisplayText</asp:ListItem>
                                                                        <asp:ListItem>ValueField</asp:ListItem>
                                                                        <asp:ListItem>SpecificValue</asp:ListItem>
                                                                    </asp:DropDownList>
                                                                    <%--  <asp:TextBox runat="server" Visible="false" Width="50px" ID="txtSpecificValueFilter"></asp:TextBox>--%>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Search By Value">
                                                                <HeaderStyle HorizontalAlign="Center" Width="110px" />
                                                                <ItemStyle HorizontalAlign="Left" Width="110px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblSearchByValueFilter" Text='<%# DataBinder.Eval(Container, "DataItem.RFM_Search_By_ValueField")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox runat="server" Visible="false" Width="110px" ID="txtSearchByValueFilter"></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>
                                                            
                                                            <asp:TemplateField HeaderText="Type">
                                                                <HeaderStyle Width="60px" />
                                                                <ItemStyle Width="60px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblFilterType" Text='<%# DataBinder.Eval(Container, "DataItem.RFM_Comparator")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="ddlFilterType" Width="60px" CssClass="ddl">
                                                                    </asp:DropDownList>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Default Min Value">
                                                                <HeaderStyle Width="60px" />
                                                                <ItemStyle Width="60px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblDefaultMinVal" Text='<%# DataBinder.Eval(Container, "DataItem.RFM_Default_Min_Val")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox runat="server" Width="90px" ID="txtDefaultMinVal"></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Default Max Value">
                                                                <HeaderStyle Width="60px" />
                                                                <ItemStyle Width="60px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblDefaultMaxVal" Text='<%# DataBinder.Eval(Container, "DataItem.RFM_Default_Max_Val")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox runat="server" Width="90px" ID="txtDefaultMaxVal"></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                    </asp:GridView>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </asp:Panel>
                        </td>
                    </tr>


                    <tr>
                        <td>
                            <asp:Button ID="btnSorting" runat="server" Text="Workbench MetaData Sorting" CssClass="btn btnCommon CollpseCSS" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Panel ID="panelSorting" runat="server">
                                <div>
                                    <table>
                                        <tr>
                                            <td></td>
                                        </tr>
                                        <tr>
                                            <asp:Button ID="btnAdd2" runat="server" CssClass="btn btnWidth" Text=" Add " />
                                        </tr>
                                        <tr>
                                            <td></td>
                                        </tr>
                                        <tr>
                                            <td dir="ltr">
                                                <div>
                                                    <%--Grid 2--%>
                                                    <asp:GridView ID="grdSorting" runat="server" CssClass="Grid" AutoGenerateColumns="false" AllowPaging="false" ShowHeaderWhenEmpty="true" EmptyDataText="No data found"
                                                        AllowSorting="true" EnableViewState="true" HeaderStyle-CssClass="GridHeaderTitle11">
                                                        <RowStyle CssClass="GridItem" />
                                                       <EditRowStyle CssClass="GridItemSelect"/>
                                                        <Columns>
                                                            <asp:TemplateField HeaderText="" Visible="false">
                                                                <ItemStyle HorizontalAlign="Center" Wrap="true" Width="20px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblSortingId" Text='<%# DataBinder.Eval(Container, "DataItem.RSM_ID")%>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="">
                                                                <ItemStyle HorizontalAlign="Center" Wrap="true" Width="20px" />
                                                                <ItemTemplate>
                                                                    <asp:CheckBox runat="server" ID="chkSelectSingleSorting" Width="20px" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="">
                                                                <HeaderStyle HorizontalAlign="Center" Width="90px" />
                                                                <ItemStyle HorizontalAlign="Center" Width="90px" />
                                                                <EditItemTemplate>
                                                                    <asp:LinkButton ID="btnUpdateSorting" runat="server" CommandName="Update" Width="33px" Text="Update" HorizontalAlign="Left" CssClass="myLblColor"/>
                                                                    &nbsp;
                                                                    <asp:LinkButton ID="btnCancelSorting" runat="server" CommandName="Cancel" Width="33px" Text="Cancel" HorizontalAlign="Right" CssClass="myLblColor" />
                                                                </EditItemTemplate>
                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="btnEditSorting" runat="server" CommandName="Edit" Text="Edit" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Sorting Name">
                                                                <HeaderStyle HorizontalAlign="Center" Width="130px" />
                                                                <ItemStyle HorizontalAlign="Left" Width="130px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblSortingName" Text='<%# DataBinder.Eval(Container, "DataItem.RSM_Sorting_Name")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="ddlSortingName" Width="130px" CssClass="ddl">
                                                                    </asp:DropDownList>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Visible Y/N" ControlStyle-BorderStyle="None">
                                                                <HeaderStyle HorizontalAlign="Center" Width="70px" />
                                                                <ItemStyle HorizontalAlign="Center" Width="70px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblVisibleYNSorting" Text='<%# DataBinder.Eval(Container, "DataItem.RSM_Visible_YN")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="ddlVisibleYNSorting" Width="70px" CssClass="ddl">
                                                                        <asp:ListItem>Y</asp:ListItem>
                                                                        <asp:ListItem>N</asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Display Name">
                                                                <HeaderStyle HorizontalAlign="Center" Width="130px" />
                                                                <ItemStyle HorizontalAlign="Left" Width="130px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblDisplayNameSorting" Text='<%# DataBinder.Eval(Container, "DataItem.RSM_Display_Name")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox runat="server" Visible="false" Width="130px" ID="txtDisplayNameSorting"></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Target Field">
                                                                <HeaderStyle HorizontalAlign="Center" Width="180px" />
                                                                <ItemStyle HorizontalAlign="Left" Width="180px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblTargetFieldSorting" Text='<%# DataBinder.Eval(Container, "DataItem.RSM_Target_Field")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox runat="server" ID="txtTargetFieldSorting" Width="180px"></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>


                                                        </Columns>
                                                    </asp:GridView>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </asp:Panel>
                        </td>
                    </tr>

                    <tr>
                        <td>
                            <asp:Button ID="btnActions" runat="server" Text="Workbench MetaData Actions" CssClass="btn btnCommon CollpseCSS" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Panel ID="panelActions" runat="server">
                                <div>
                                    <table>
                                        <tr>
                                            <td></td>
                                        </tr>
                                        <tr>
                                            <asp:Button ID="btnAddActions" runat="server" CssClass="btn btnWidth" Text=" Add " />
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Button ID="dgvButton" CssClass="btn invisible" runat="server" Text="" />
                                                <asp:Button ID="btnQueueStatus" CssClass="btn invisible" runat="server" Text="" />
                                                <input id="rowIndex1" type="hidden" runat="server" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td dir="ltr">
                                                <div style="width:1700px">
                                                    <%--Grid 2--%>
                                                    <asp:GridView ID="grdActions" runat="server" CssClass="Grid" AutoGenerateColumns="false" AllowPaging="false" ShowHeaderWhenEmpty="true" EmptyDataText="No data found"
                                                        AllowSorting="true" EnableViewState="true" HeaderStyle-CssClass="GridHeaderTitle11">
                                                        <RowStyle CssClass="GridItem" />
                                                        <EditRowStyle CssClass="GridItemSelect"/>

                                                        <Columns>
                                                            <asp:TemplateField HeaderText="" Visible="false">
                                                                <ItemStyle HorizontalAlign="Center" Wrap="true" Width="20px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblActionsId" Text='<%# DataBinder.Eval(Container, "DataItem.RAM_Id")%>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="">
                                                                <ItemStyle HorizontalAlign="Center" Wrap="true" Width="20px" />
                                                                <ItemTemplate>
                                                                    <asp:CheckBox runat="server" ID="chkSelectSingleAction" Width="20px" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="">
                                                                <HeaderStyle HorizontalAlign="Center" CssClass="width1"/>
                                                                <ItemStyle HorizontalAlign="Center" CssClass="width1"/>
                                                                <EditItemTemplate>
                                                                    <asp:LinkButton ID="btnUpdateAction" runat="server" CommandName="Update" Text="Update" HorizontalAlign="Left"/>
                                                                    &nbsp; 
                                                                    <asp:LinkButton ID="btnCancelAction" runat="server" CommandName="Cancel" Text="Cancel" HorizontalAlign="Right"/>
                                                                </EditItemTemplate>
                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="btnEditAction" runat="server" CommandName="Edit" Text="Edit" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Field Name">
                                                                <HeaderStyle HorizontalAlign="Center" CssClass="width2"/>
                                                                <ItemStyle HorizontalAlign="Left" CssClass="width2"/>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblFieldName" Text='<%# DataBinder.Eval(Container, "DataItem.RAM_FieldName")%>' CssClass="wordwrap"></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="ddlFieldName" CssClass="ddl width2">
                                                                    </asp:DropDownList>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>
                                                            
                                                            <asp:TemplateField HeaderText="Layout Code" ControlStyle-BorderStyle="None">
                                                                <HeaderStyle HorizontalAlign="Center" CssClass="width1"/>
                                                                <ItemStyle HorizontalAlign="Left" CssClass="width1"/>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblLayoutCode" Text='<%# DataBinder.Eval(Container, "DataItem.RAM_Layout_Code")%>' CssClass="wordwrap"></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="ddlLayoutCode" CssClass="ddl width1">
                                                                    </asp:DropDownList>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Display Name" ControlStyle-BorderStyle="None">
                                                                <HeaderStyle HorizontalAlign="Center" CssClass="width3"/>
                                                                <ItemStyle HorizontalAlign="Left" CssClass="width3"/>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblDisplayNameAction" Text='<%# DataBinder.Eval(Container, "DataItem.RAM_DisplayName")%>' CssClass="wordwrap"></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox runat="server" Visible="false" ID="txtDisplayNameAction" CssClass="width3"></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Target Field">
                                                                <HeaderStyle HorizontalAlign="Center" CssClass="width4"/>
                                                                <ItemStyle HorizontalAlign="Left" CssClass="width4"/>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblTargetFieldAction" Text='<%# DataBinder.Eval(Container, "DataItem.RAM_TargetField")%>' CssClass="wordwrap"></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox runat="server" ID="txtTargetFieldAction" CssClass="width4"></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Visible Y/N" ControlStyle-BorderStyle="None">
                                                                <HeaderStyle HorizontalAlign="Center" CssClass="width5"/>
                                                                <ItemStyle HorizontalAlign="Center" CssClass="width5"/>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblVisibleYNAction" Text='<%# DataBinder.Eval(Container, "DataItem.RAM_VisibleYN")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="ddlVisibleYNAction" CssClass="ddl width5">
                                                                        <asp:ListItem>Y</asp:ListItem>
                                                                        <asp:ListItem>N</asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Display Name CSS Style" ControlStyle-BorderStyle="None">
                                                                <HeaderStyle HorizontalAlign="Center" CssClass="width4"/>
                                                                <ItemStyle HorizontalAlign="Left" CssClass="width4"/>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblCSSStyleAction" Text='<%# DataBinder.Eval(Container, "DataItem.RAM_CSS_Style")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox runat="server" Visible="false" CssClass="width4" TextMode="MultiLine" ID="txtCSSStyleAction"></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Target Field CSS Style" ControlStyle-BorderStyle="None">
                                                                <HeaderStyle HorizontalAlign="Center" CssClass="width4"/>
                                                                <ItemStyle HorizontalAlign="Left" CssClass="width4"/>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblCSSStyleTotargetFieldAction" Text='<%# DataBinder.Eval(Container, "DataItem.RAM_CSS_StyleTo_TargetField")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox runat="server" Visible="false" CssClass="width4" TextMode="MultiLine" ID="txtCSSStyleToTargetFieldAction"></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Apply CSS Style To" ControlStyle-BorderStyle="None" Visible="false">
                                                                <HeaderStyle HorizontalAlign="Center" CssClass="width2"/>
                                                                <ItemStyle HorizontalAlign="Left" CssClass="width2"/>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblCSSTo" Text='<%# DataBinder.Eval(Container, "DataItem.RAM_ApplyCssStyleTo")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="ddlCSSTo" CssClass="ddl width2">
                                                                        <asp:ListItem>DisplayName</asp:ListItem>
                                                                        <asp:ListItem>TargetField</asp:ListItem>
                                                                        <asp:ListItem>Both</asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Screen Open Mode" ControlStyle-BorderStyle="None">
                                                                <HeaderStyle HorizontalAlign="Center" CssClass="width6"/>
                                                                <ItemStyle HorizontalAlign="Left" CssClass="width6"/>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblScreenOpenMode" Text='<%# DataBinder.Eval(Container, "DataItem.RAM_ScreenOpenMode")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="ddlScreenOpenMode" CssClass="ddl width6">
                                                                        <asp:ListItem>Inline</asp:ListItem>
                                                                        <asp:ListItem>PopUp</asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>
                                                            
                                                            <asp:TemplateField HeaderText="Data Type" ControlStyle-BorderStyle="None">
                                                                <HeaderStyle HorizontalAlign="Center" CssClass="width1"/>
                                                                <ItemStyle HorizontalAlign="Left" CssClass="width1"/>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblDatatype" Text='<%# DataBinder.Eval(Container, "DataItem.RAM_DataType")%>' CssClass="wordwrap"></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="ddlDataType" CssClass="ddl width1">
                                                                    </asp:DropDownList>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>
                                                            
                                                            <asp:TemplateField HeaderText="Number Format" ControlStyle-BorderStyle="None">
                                                                <HeaderStyle CssClass="width6"/>
                                                                <ItemStyle HorizontalAlign="Right" CssClass="width6"/>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblNumberFormat" Text='<%# DataBinder.Eval(Container, "DataItem.RAM_NumberFormat")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="ddlNumberFormat" CssClass="ddl width6">
                                                                        <asp:ListItem></asp:ListItem>
                                                                        <asp:ListItem>1</asp:ListItem>
                                                                        <asp:ListItem>2</asp:ListItem>
                                                                        <asp:ListItem>3</asp:ListItem>
                                                                        <asp:ListItem>4</asp:ListItem>
                                                                        <asp:ListItem>5</asp:ListItem>
                                                                        <asp:ListItem>6</asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="User Group Access" ControlStyle-BorderStyle="None">
                                                                <HeaderStyle HorizontalAlign="Center" Width="400px"/>
                                                                <ItemStyle HorizontalAlign="Left" Width="400px"/>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblUserAccess" Text='<%# DataBinder.Eval(Container, "DataItem.RAM_UserAccess")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <%--Aditya B || 07-Oct-2021 || Action Link-User Group Mapping || JIRA: MASCLI-1601 || Start--%>
                                                                    <asp:TextBox ID="txtUsrGrp" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RAM_UserAccess").ToString)%>'>
                                                                    </asp:TextBox>
                                                                    <asp:HiddenField ID="hdnUID" runat="server" Value="" /> 
                                                                    <%--Aditya B || 07-Oct-2021 || Action Link-User Group Mapping || JIRA: MASCLI-1601 || End--%>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <%--Aditya B || 12-Oct-2021 || Action Link-Queue Status Mapping || JIRA: HSBCELIINT-69 || Start--%>
                                                            <asp:TemplateField HeaderText="Queue Access" ControlStyle-BorderStyle="None">
                                                                <HeaderStyle HorizontalAlign="Center" Width="400px"/>
                                                                <ItemStyle HorizontalAlign="Left" Width="400px"/>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblQueueAccess" Text='<%# DataBinder.Eval(Container, "DataItem.RAM_QueueAccess")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="txtQueueAccess" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RAM_QueueAccess").ToString)%>'>
                                                                    </asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>
                                                            <%--Aditya B || 12-Oct-2021 || Action Link-Queue Status Mapping || JIRA: HSBCELIINT-69 || End--%>
                                                            
                                                            <%--Aditya B || 05-Oct-2021 || Action Link-User Group Mapping || JIRA: MASCLI-1601 || Start--%>
                                                            <asp:TemplateField HeaderText="Action Link ID" ControlStyle-BorderStyle="None" Visible="false">
                                                                <HeaderStyle HorizontalAlign="Center" CssClass="width4"/>
                                                                <ItemStyle HorizontalAlign="Left" CssClass="width4"/>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblActionLinkId" Text='<%# DataBinder.Eval(Container, "DataItem.RAM_ID")%>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <%--Aditya B || 05-Oct-2021 || Action Link-User Group Mapping || JIRA: MASCLI-1601 || End--%>
                                                        </Columns>
                                                    </asp:GridView>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </asp:Panel>

                            <%--Aditya B || 30-Sep-2021 || For Action Link-User Group Mapping || JIRA: MASCLI-1601 || Start--%>
                            <asp:Panel ID="grpUsergroup" runat="server" CssClass="groupBoxGrids invisible">
                                <div id="divUser_permissions" class="UserPermissions beutifyPopUp" runat="server">
                                    <fieldset class="MainFieldSet">
                                        <legend>
                                            <table>
                                                <tr>
                                                    <td>
                                                        <table class="InnerTable">
                                                            <tr>
                                                                <td>
                                                                    <asp:TextBox ID="txtUsername" CssClass="txt txtUsername" runat="server" Text="" onkeydown="return EnterKeyEventUsergrp(event)"></asp:TextBox>
                                                                </td>
                                                                <td>
                                                                    <asp:Button ID="btnLoadGrp" CssClass="btn btnGroupbox" runat="server" Text="Load" />
                                                                </td>
                                                                <td>
                                                                    <asp:Button ID="btnApply" CssClass="btn btnGroupbox" runat="server" Text="Apply" />
                                                                </td>
                                                                <td>
                                                                    <asp:Button ID="btnCloseGrp" runat="server" Text="X" CssClass="btn btnClose" />
                                                                </td>


                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="GridContainerTD">
                                                            <asp:GridView ID="dgvUser" runat="server" AllowSorting="True"
                                                                AutoGenerateColumns="false" BorderStyle="Solid" BorderWidth="1px" CellPadding="3"
                                                                CssClass="Grid" Width="361px">
                                                                <HeaderStyle CssClass="GridHeader" />

                                                                <Columns>
                                                                    <asp:TemplateField HeaderStyle-Wrap="true" HeaderText=" ">
                                                                        <HeaderStyle Wrap="True" Width="25px" HorizontalAlign="Center" />
                                                                        <HeaderTemplate>
                                                                            <asp:CheckBox ID="chkAll" runat="server" onclick="checkAll(this);" />
                                                                        </HeaderTemplate>
                                                                        <ItemTemplate>
                                                                            <asp:CheckBox ID="chkbox_UserQGrp" runat="server"></asp:CheckBox>
                                                                        </ItemTemplate>
                                                                        <HeaderStyle Wrap="true" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="false" />
                                                                    </asp:TemplateField>


                                                                    <asp:TemplateField HeaderText="User ID">
                                                                        <HeaderStyle></HeaderStyle>
                                                                        <ItemStyle></ItemStyle>
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="lblusrId" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.U_ID").ToString)%>' />
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>

                                                                    <asp:TemplateField HeaderText="User Name">
                                                                        <HeaderStyle></HeaderStyle>
                                                                        <ItemStyle></ItemStyle>
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="lblusr" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Name").ToString)%>' />
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>

                                                                    <%--    <asp:TemplateField HeaderText="User Name">
                                                <HeaderStyle></HeaderStyle>
                                                <ItemStyle></ItemStyle>
                                                <ItemTemplate>
                                                    <asp:Label ID="lblusr" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Name").ToString)%>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="User ID" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblusrID" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.U_ID").ToString)%>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>--%>
                                                                </Columns>
                                                            </asp:GridView>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>
                                        </legend>
                                    </fieldset>
                                </div>
                                <div id="overlayDiv" class="overlaySearch"></div>
                            </asp:Panel>
                            <%--Aditya B || 30-Sep-2021 || For Action Link-User Group Mapping || JIRA: MASCLI-1601 || End--%>

                            <%--Aditya B || 11-Oct-2021 || For Action Link-Queue Status Mapping || JIRA: HSBCELINT-69 || Start--%>
                            <asp:Panel ID="pnQueueStatus" runat="server" CssClass="groupBoxGrids invisible">
                                <div id="dvQueueStatus" class="UserPermissions beutifyPopUp" runat="server">
                                    <fieldset class="MainFieldSet">
                                        <legend>
                                            <table>
                                                <tr>
                                                    <td>
                                                        <table class="InnerTable">
                                                            <tr>
                                                                <td>
                                                                    <asp:TextBox ID="txtQueueStatus" CssClass="txt txtUsername" runat="server" Text="" onkeydown="return EnterKeyEventQueueStatus(event)"></asp:TextBox>
                                                                </td>
                                                                <td>
                                                                    <asp:Button ID="btnLoadQueueStatus" CssClass="btn btnGroupbox" runat="server" Text="Load" />
                                                                </td>
                                                                <td>
                                                                    <asp:Button ID="btnApplyQueueStatus" CssClass="btn btnGroupbox" runat="server" Text="Apply" />
                                                                </td>
                                                                <td>
                                                                    <asp:Button ID="btnClose" runat="server" Text="X" CssClass="btn btnClose" />
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="GridContainerTD">
                                                            <asp:GridView ID="grdQueueStatus" runat="server" AllowSorting="True"
                                                                AutoGenerateColumns="false" BorderStyle="Solid" BorderWidth="1px" CellPadding="3"
                                                                CssClass="Grid" Width="361px">
                                                                <HeaderStyle CssClass="GridHeader" />

                                                                <Columns>
                                                                    <asp:TemplateField HeaderStyle-Wrap="true" HeaderText=" ">
                                                                        <HeaderStyle Wrap="True" Width="25px" HorizontalAlign="Center" />
                                                                        <HeaderTemplate>
                                                                            <asp:CheckBox ID="chkAll" runat="server" onclick="checkAll(this);" />
                                                                        </HeaderTemplate>
                                                                        <ItemTemplate>
                                                                            <asp:CheckBox ID="chkbox_QueueStatus" runat="server"></asp:CheckBox>
                                                                        </ItemTemplate>
                                                                        <HeaderStyle Wrap="true" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="false" />
                                                                    </asp:TemplateField>

                                                                    <asp:TemplateField HeaderText="Queue Name">
                                                                        <HeaderStyle></HeaderStyle>
                                                                        <ItemStyle></ItemStyle>
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="lblQueueName" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.QueueName").ToString)%>' />
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>

                                                                    <%--<asp:TemplateField HeaderText="Queue Code" Visible="false">
                                                                        <HeaderStyle></HeaderStyle>
                                                                        <ItemStyle></ItemStyle>
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="lblQueueCode" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.QueueCode").ToString)%>' />
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>--%>
                                                                </Columns>
                                                            </asp:GridView>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>
                                        </legend>
                                    </fieldset>
                                </div>
                                <div id="overlayDiv_QueueMapping" class="overlaySearch"></div>
                            </asp:Panel>
                            <%--Aditya B || 11-Oct-2021 || For Action Link-Queue Status Mapping || JIRA: HSBCELINT-69 || End--%>
                        </td>
                    </tr>

                    <tr>
                        <td>
                            <asp:Button ID="btnDataTypes" runat="server" Text="Workbench MetaData Data Types" Visible="false" CssClass="btn btnCommon CollpseCSS " />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Panel ID="panelDataTypes" visible="false" runat="server">
                                <div>
                                    <table>
                                        <tr>
                                            <td></td>
                                        </tr>
                                        <tr>
                                            <asp:Button ID="btnAddDataTypes" runat="server" CssClass="btn btnWidth" Text=" Add " />
                                        </tr>
                                        <tr>
                                            <td></td>
                                        </tr>
                                        <tr>
                                            <td dir="ltr">
                                                <div>
                                                    <%--Grid 1--%>
                                                    <asp:GridView ID="grdDataTypes" runat="server" CssClass="Grid" AutoGenerateColumns="false" AllowPaging="false" ShowHeaderWhenEmpty="true" EmptyDataText="No Data Found"
                                                        AllowSorting="true" EnableViewState="true" HeaderStyle-CssClass="GridHeaderTitle11">
                                                        <RowStyle CssClass="GridItem" />
                                                        <EditRowStyle CssClass="GridItemSelect"/>
                                                        <Columns>

                                                            <asp:TemplateField HeaderText="" Visible="false">
                                                                <ItemStyle HorizontalAlign="Center" Wrap="true" Width="20px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblDataTypeId" Text='<%# DataBinder.Eval(Container, "DataItem.RADT_Id")%>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="">
                                                                <ItemStyle HorizontalAlign="Center" Wrap="true" Width="20px" />
                                                                <ItemTemplate>
                                                                    <asp:CheckBox runat="server" ID="chkSelectSingleDataType" AutoPostBack="true" Width="20px" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="">
                                                                <HeaderStyle HorizontalAlign="Center" Width="90px" />
                                                                <ItemStyle HorizontalAlign="Center" Width="90px" />
                                                                <EditItemTemplate>
                                                                    <asp:LinkButton ID="btnUpdateDataType" runat="server" CommandName="Update" Width="33px" Text="Update" HorizontalAlign="Left" ForeColor="#2840e0" />
                                                                    &nbsp;
                                                                    <asp:LinkButton ID="btnCancelDataType" runat="server" CommandName="Cancel" Width="33px" Text="Cancel" HorizontalAlign="Right" ForeColor="#2840e0" />
                                                                </EditItemTemplate>
                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="btnEditDataType" runat="server" CommandName="Edit" Text="Edit" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>


                                                            <asp:TemplateField HeaderText="Data Type">
                                                                <HeaderStyle HorizontalAlign="Center" Width="130px" />
                                                                <ItemStyle HorizontalAlign="Left" Width="130px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblDataType" Text='<%# DataBinder.Eval(Container, "DataItem.RADT_DataType")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="ddlDataType" Width="130px" CssClass="ddl" AutoPostBack="true" OnSelectedIndexChanged="ddlDataType_SelectedIndexChanged">
                                                                    </asp:DropDownList>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>


                                                            <asp:TemplateField HeaderText="Sub Data Type">
                                                                <HeaderStyle HorizontalAlign="Center" Width="130px" />
                                                                <ItemStyle HorizontalAlign="Left" Width="130px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblSubDataType" Text='<%# DataBinder.Eval(Container, "DataItem.RADT_SubDataType")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="ddlSubDataType" Width="130px" CssClass="ddl">
                                                                    </asp:DropDownList>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>


                                                            <asp:TemplateField HeaderText="Source Data">
                                                                <HeaderStyle HorizontalAlign="Center" Width="180px" />
                                                                <ItemStyle HorizontalAlign="Left" Width="180px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblSourceData" Text='<%# DataBinder.Eval(Container, "DataItem.RADT_SourceData")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox runat="server" Visible="false" Width="180px" ID="txtSourceData"></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="CSS Style" ControlStyle-BorderStyle="None">
                                                                <HeaderStyle HorizontalAlign="Center" Width="180px" />
                                                                <ItemStyle HorizontalAlign="Left" Width="180px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblCSSStyleRADT" Text='<%# DataBinder.Eval(Container, "DataItem.RADT_CSS_Style ")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox runat="server" Visible="false" Width="180px" TextMode="MultiLine" ID="txtCSSStyleRADT"></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Display Priority">
                                                                <HeaderStyle HorizontalAlign="Center" Width="130px" />
                                                                <ItemStyle HorizontalAlign="Left" Width="130px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblDisplayPriority" Text='<%# DataBinder.Eval(Container, "DataItem.RADT_DisplayPriority ")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox runat="server" Visible="false" Width="130px" ID="txtDisplayPriority"></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                        </Columns>
                                                    </asp:GridView>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </asp:Panel>
                        </td>
                    </tr>

                    <tr>
                        <td>
                            <asp:Button ID="btnLayoutStyle" runat="server" Text="Workbench MetaData Layout Style" CssClass="btn btnCommon CollpseCSS" />
                        </td>
                    </tr>

                    <tr>
                        <td>
                            <asp:Panel ID="pnlLayoutStyle" runat="server">
                                <div>
                                    <table>
                                        <tr>
                                            <td></td>
                                        </tr>
                                        <tr>
                                            <asp:Button ID="btnAddLayoutStyle" runat="server" CssClass="btn btnWidth" Text=" Add " />
                                        </tr>
                                        <tr>
                                            <td></td>
                                        </tr>
                                        <tr>
                                            <td dir="ltr">
                                                <div>
                                                    <%--Grid 2--%>
                                                    <asp:GridView ID="grdLayoutStyle" runat="server" CssClass="Grid" AutoGenerateColumns="false" AllowPaging="false" ShowHeaderWhenEmpty="true" EmptyDataText="No data found"
                                                        AllowSorting="true" EnableViewState="true" HeaderStyle-CssClass="GridHeaderTitle11">
                                                        <RowStyle CssClass="GridItem" />
                                                        <EditRowStyle CssClass="GridItemSelect"/>

                                                        <Columns>
                                                            <asp:TemplateField Visible="false">
                                                                <ItemStyle HorizontalAlign="Center" Wrap="true" Width="20px" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblLayoutStyleId" Text='<%# DataBinder.Eval(Container, "DataItem.RLSM_Id")%>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderStyle-CssClass="width10">
                                                                <ItemStyle HorizontalAlign="Center" Wrap="true" CssClass="width10" />
                                                                <ItemTemplate>
                                                                    <asp:CheckBox runat="server" ID="chkSelectSingleLayoutStyle"/>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField>
                                                                <HeaderStyle HorizontalAlign="Center" CssClass="width1"/>
                                                                <ItemStyle HorizontalAlign="Center" CssClass="width1"/>
                                                                <EditItemTemplate>
                                                                    <asp:LinkButton ID="btnUpdateLayoutStyle" runat="server" CommandName="Update" Text="Update" HorizontalAlign="Left"/>
                                                                    &nbsp; 
                                                                    <asp:LinkButton ID="btnCancelLayoutStyle" runat="server" CommandName="Cancel" Text="Cancel" HorizontalAlign="Right"/>
                                                                </EditItemTemplate>
                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="btnEditAction" runat="server" CommandName="Edit" Text="Edit" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Layout Code" ControlStyle-BorderStyle="None">
                                                                <HeaderStyle HorizontalAlign="Center" CssClass="width1"/>
                                                                <ItemStyle CssClass="width1"/>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblLayoutCode" Text='<%# DataBinder.Eval(Container, "DataItem.RLSM_Layout_Code")%>' CssClass="wordwrap"></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="ddlLayoutCode" CssClass="ddl width1">
                                                                    </asp:DropDownList>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Show Header" ControlStyle-BorderStyle="None">
                                                                <HeaderStyle CssClass="width8"/>
                                                                <ItemStyle HorizontalAlign="Center" CssClass="width8"/>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblShowHeader" Text='<%# DataBinder.Eval(Container, "DataItem.RLSM_Display_Header")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="ddlShowHeader" CssClass="ddl width8">
                                                                        <asp:ListItem>Y</asp:ListItem>
                                                                        <asp:ListItem>N</asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>
                                                            
                                                            <asp:TemplateField HeaderText="Show Row Separator" ControlStyle-BorderStyle="None">
                                                                <HeaderStyle CssClass="width9"/>
                                                                <ItemStyle HorizontalAlign="Center" CssClass="width9"/>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblShowRowSeparator" Text='<%# DataBinder.Eval(Container, "DataItem.RLSM_Display_Row_Separator")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="ddlShowRowSeparator" CssClass="ddl width9">
                                                                        <asp:ListItem>Y</asp:ListItem>
                                                                        <asp:ListItem>N</asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Row Separator CSS" ControlStyle-BorderStyle="None">
                                                                <HeaderStyle CssClass="width4"/>
                                                                <ItemStyle CssClass="width4"/>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblCSSStyleLayoutStyle" Text='<%# DataBinder.Eval(Container, "DataItem.RLSM_CSS_Style")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox runat="server" CssClass="width4" TextMode="MultiLine" ID="txtCSSStyleLayoutStyle"></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                        </Columns>
                                                    </asp:GridView>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </asp:Panel>
                        </td>
                    </tr>

                </table>
                <asp:HiddenField ID="hdnLayoutCode" runat="server" />
                <asp:HiddenField ID="hdnTemplateID" runat="server" />
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>

