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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    </asp:ScriptManagerProxy>
    <script src="../FinIQJS/SortFilter_Grid.js"></script>
<%--    <script src="../FinIQJS/FreezeGrid.js"></script>
    <link href="../FinIQJS/FreezeGrid.css" rel="stylesheet" type="text/css"/>--%>
    <style type="text/css">
        .hide {
            display:none !important;
        }
        .lblgrpWFtypeCss {
            width: 90px;
        }

        .defaultWidthbtn {
            Width: 100px;
        }

        .Visible {
            display: block;
        }

        .invisible {
            display: none;
        }

        .cboWFTypeddl {
            width: 330px;
        }

        .tdcboWFTypeddl {
            width: 360px;
        }

        .btnGroupbox {
            width: 70px;
        }

        /*Added By Shubham Podhade on 18-nov-2019*/
        .btnGroupbox1 {
            width: 50px;
        }
        /*Added By Shubham Podhade on 18-nov-2019*/
        .DDLYN {
            width: 50px;
        }

        .groupBoxGridsButtons, .groupBoxUserAccess, .groupBoxGridsAllowedQ, .groupBoxGridsRightClickAction {
            position: absolute;
            /*left: 580px;
            top: 250px;*/
            height: auto;
            border: solid 1px #ccc;
            border-radius: 12px;
        }

        .groupBoxGridsButtons {
            width: 1000px;
            height: auto;
        }

        /*.groupBoxUserAccess {
            width: 360px !important;
            /*max-height: 400px !important;*/
        /*}*/

        .groupBoxGridsAllowedQ {
            width: 330px;
            max-height: 403px !important;
        }

        .groupBoxGridsRightClickAction {
            width: 350px;
            /*max-height: 403px !important;*/
        }

        .btnDetailsDiv {
            background-color: #FFF;
            height: auto;
        }

        /*Added By Shubham Podhade on 18-nov-2019*/
        .btnDetailsDivAllowedQueue {
            background-color: #FFF;
            height: auto;
            width: 328px;
        }
        /*Added By Shubham Podhade on 18-nov-2019*/
        .CloseButton {
            float: right;
        }

        #divButtonDetailsControls, #divUserAccessControls, #divAllowedQControls, #divRightClickActionControls, #divRightClickAction {
            padding: 6px;
        }

        #divButtonDetailsGrid, #divUserAccessGrid, #divAllowedQGrid, #divAllowedQ, #divRightClickActionGrid {
            width: auto;
            height: auto;
            overflow: auto;
            padding: 5px;
            background-color: #f9f9f9;
        }

        #divButtonDetailsGrid {
            max-width: 1000px !important;
            max-height: 600px !important;
            overflow-y: hidden;
        }

        #divUserAccessGrid {
            max-width: 350px !important;
            max-height: 357px !important;
            margin-bottom: 5px;
        }

        #divAllowedQGrid {
            max-width: 350px !important;
            /*max-height: 400px !important;
            height: 357px;*/
            /*height: auto;
            overflow-y: hidden;*/
            max-height: 357px !important;
            margin-bottom: 5px;
        }

        #divRightClickActionGrid {
            max-width: 350px !important;
            max-height: 360px !important;
            width: 335px;
        }

        .divLoading {
            position: absolute;
            top: 40px;
            left: 360px;
        }

        .tblGrid {
            margin-top: 6px;
        }

        /*.pinned 
        {
        position:fixed;
        z-index:100;
        overflow: hidden;
        }

        .scrolled 
        {
            position:relative;
            left:400px;
            overflow: auto;
            white-space:nowrap;
            min-width:500px;
        }

        .col1 {
            left:170px;
            width:150px;
        }*/

        /*.FrozenCell
        {
          
            position: fixed;
            
           /* left: expression(document.getElementById("gridviewcontainer").scrollLeft-2);* /
        }*/

        /*.FrozenHeader
        {
         background-color:Gray;
            position: relative;
            cursor: default;          
            top: expression(document.getElementById("gridviewcontainer").scrollTop-2);
            z-index: 10;
        }
        /*for the locked columns header to stay on top*/
        /*.FrozenHeader.locked
        {
            z-index: 99;
        }*/

        .lbl {
            white-space: normal !important;
        }


        /*Added By Shubham Podhade on 18-nov-2019 ==== START  */
        .myRowEditBgColor {
            background-color: #e7e7e7 !important;
        }

        .mylblBgColor {
            color: #0284e0 !important;
        }

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

        .UserGrpPopup1 {
            z-index: 5000 !important;
        }


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

        .PopUpPosition {
            position: absolute;
            top: 39%;
            left: 42%;
            margin-top: -50px;
            margin-left: -50px;
            width: 100px;
            height: 100px;
        }

        .PopUpPositionBtn {
            position: absolute;
            top: 39%;
            left: 28%;
            margin-top: -50px;
            margin-left: -50px;
            width: 1000px;
            height: 100px;
        }

        .PopUpPositionUserGroupsvertEdit {
            position: absolute;
            top: 55%;
            left: 45%;
            margin-top: -50px;
            margin-left: -50px;
            width: 100px;
            height: 100px;
        }

        .PopUpPositionAllowedQvertEdit {
            position: absolute;
            top: 71%;
            left: 45%;
            margin-top: -50px;
            margin-left: -50px;
            width: 100px;
            height: 100px;
        }

        .PopUpPositionBtnVertEdit {
            position: absolute;
            top: 53%;
            left: 45%;
            margin-top: -50px;
            margin-left: -50px;
            width: 1000px;
            height: 100px;
        }

        /*.ChkAllPadding {
            padding-left: 0px !important;
        }*/
        .GridItemSelect {
            background-color: #e7e7e7 !important;
        }

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

        .groupBoxGrids2 {
            position: absolute !important;
            background-color: #f9f9f9;
            left: 29%;
            top: 24%;
            /*height: 310px !important;*/
            width: 375px !important;
            /*display: none;*/
            border: solid 1px #CCCCCC;
            border-radius: 12px;
        }

        .divVerticalEditmain {
            background-color: #FFF;
            height: auto;
        }

        .beutifyPopUp {
            border-radius: 8px;
            box-shadow: 0 0 10px #000000;
        }

        .beutifyPopUpVertEdit {
            border-radius: 12px;
            box-shadow: 0 0 10px #0a0a0a;
        }

        .VerticalOn {
            background-image: url("../App_Resources/On_Button.png");
            width: 122px !important;
            height: 25px  !important;
            border: none 0px #FFF !important;
            color: #FFF !important;
            outline: 0 !important;
            background-color: #FFFFFF;
            background-repeat: no-repeat;
        }

        .VerticalOff {
            background-image: url("../App_Resources/Off_Button.png");
            width: 122px !important;
            height: 25px  !important;
            border: none 0px #FFF !important;
            color: #FFF !important;
            outline: 0 !important;
            background-color: #FFFFFF;
            background-repeat: no-repeat;
        }

        .lblvertEditInfo {
            padding: 0px 15px 0px 15px !important;
        }
        /*Added By Shubham Podhade on 18-Nov-2019 ==== END  */
    </style>





    <asp:UpdatePanel ID="UpdatePanelCP" runat="server">
        <ContentTemplate>
            <asp:HiddenField runat="server" ID="rowIndexBtn" Value="" />
            <asp:HiddenField runat="server" ID="rowIndexUsr" Value="" />
            <asp:HiddenField runat="server" ID="rowIndexAllQ" Value="" />
            <asp:HiddenField runat="server" ID="rowIndexRightClick" Value="" />

            <table id="upperTable" runat="server" class="">
                <tr>
                    <td>
                        <table>
                            <tr>
                                <td colspan="4">
                                    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanelCP"
                                        DisplayAfter="0">
                                        <ProgressTemplate>
                                            <div class="divLoading">
                                                <img alt="Loading" src="../App_Resources/loading.gif" /><span class="lbl">Loading...&nbsp;&nbsp;</span>
                                            </div>
                                        </ProgressTemplate>
                                    </asp:UpdateProgress>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4">
                                    <asp:Label ID="lblSuccess" CssClass="lblSuccess" runat="server" Text=""></asp:Label>
									<asp:Label ID="lblInfo" CssClass="lblInfo" runat="server" Text=""></asp:Label>
                                    <asp:Label ID="lblError" CssClass="lblerror" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td class="lblgrpWFtypeCss">
                                    <asp:Label ID="lblgrpWFtype" runat="server" CssClass="lbl" Text="Workflow Type"></asp:Label>
                                </td>
                                <td class="tdcboWFTypeddl">
                                    <asp:DropDownList ID="cboWFType" runat="server" CssClass="ddl cboWFTypeddl" AutoPostBack="true"></asp:DropDownList>
                                </td>
                                <td style="vertical-align: top;">
                                    <asp:Button ID="btnLoad" runat="server" Text="Load" CssClass="btn defaultWidthbtn" />

                                    <asp:Button ID="btnSave" runat="server" Text="Update" CssClass="btn defaultWidthbtn" Enabled="false" Visible="false" />

                                    <asp:Button ID="btnDelete" runat="server" Text="Delete" CssClass="btn defaultWidthbtn" OnClientClick="return confirm('Are you sure you want to delete this queue ?');" />
                                </td>
                                <td>
                                    <asp:Button ID="btnSaveInsertUpdate" runat="server" Text="Save" CssClass="btn defaultWidthbtn" />
                                </td>
                                 <%--Added by Nikhil Mali for Rows Per Page - 999 : START--%>
                                
                                 <%--Added by Nikhil Mali for Rows Per Page - 999 : END--%>
                                <td>
                                    <asp:Label ID="currentActionlbl" runat="server" Text="" CssClass="lbl"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="lblQueueNametop" runat="server" CssClass="lbl" Text="Queue Name"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtQueueName1" runat="server" CssClass="txt cboWFTypeddl"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:Button ID="btnAdd" runat="server" Text="Add" CssClass="btn defaultWidthbtn" />

                                    <asp:Button ID="btnExport" runat="server" Text="Export" CssClass="btn defaultWidthbtn" />

                                    <asp:Button ID="btnImport" runat="server" Text="Import" CssClass="btn defaultWidthbtn" Visible="false" />
                                </td>
                                <td>
                                  <asp:Label ID="lblRowsPerPage" runat="server" Text="Rows per page" Style="margin-left: 5px;"/>
                                  <asp:TextBox ID="txtRowsPerPage" runat="server" Text="999" Width="40px"  Style="text-align:center;" AutoPostBack="true" MaxLength="3" onkeydown="EnterKeyEvent(event)" onkeypress="return AllowNumericOnly(event)" />
                               </td>
                            </tr>
                        </table>
                    </td>
                </tr>

                <tr>
                    <td>
                        <%--  <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>--%>

                        <table id="lowerTable" runat="server" class="tblGrid">
                            <tr>
                                <td>

                                    <asp:GridView ID="dgvExistingQueue" runat="server" AllowSorting="True" AutoGenerateColumns="False" PageSize="999" PagerStyle-Height="32px"
                                        AllowPaging="true" CssClass="Grid" ShowHeaderWhenEmpty="true" RowHeadersWidthSizeMode="DisableResizing;" SelectedRowStyle-Wrap="true"
                                        HeaderStyle-CssClass="GridHeaderTitle">
                                        <HeaderStyle CssClass="GridHeader" />
                                        <SelectedRowStyle CssClass="GridItemSelect" />
                                        <RowStyle CssClass="GridItem" />
                                        <HeaderStyle CssClass="GridHeader" />
                                        <FooterStyle CssClass="GridFooter" />
                                        <PagerStyle CssClass="GridPager" />

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

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

                                        <Columns>
                                            <asp:TemplateField HeaderText="">
                                                <ItemStyle Width="20px" />
                                                <HeaderStyle Width="20px" />
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="dgvExistingChkRow" runat="server" Checked='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.CheckBtn"))%>' AutoPostBack="true" OnCheckedChanged="CountCheckedRows"></asp:CheckBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <%--<asp:CommandField ButtonType="Link" ShowEditButton="true" EditText="Edit" UpdateText="Update" CancelText="Cancel"  ShowCancelButton ="true"  ControlStyle-Width="40" >
                                                <HeaderStyle Width="40" />
                                                <ItemStyle Wrap="false" Width="40" HorizontalAlign="center" />
                                            </asp:CommandField>--%>


                                            <asp:TemplateField HeaderText="Actions" ControlStyle-Width="70">
                                                <HeaderStyle Width="70" />
                                                <ItemStyle Wrap="true" Width="70" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <asp:LinkButton runat="server" ID="viewGraph" CommandArgument='<%#Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ID").ToString)%>'
                                                        CommandName="viewGraph">View Graph</asp:LinkButton>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Id" ControlStyle-Width="40">
                                                <HeaderStyle Width="40" />
                                                <ItemStyle Wrap="true" Width="40" HorizontalAlign="center" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblId" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.ID").ToString )%>' />
                                                   <%-- <asp:TextBox ID="txtId" runat="server" CssClass="txt"></asp:TextBox>--%>
                                                </ItemTemplate>
                                                <%--    <EditItemTemplate>
                                                        <asp:TextBox ID="txtId" runat="server" CssClass="txt"></asp:TextBox>
                                                    </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Code" Visible="True">

                                                <ItemTemplate>
                                                    <asp:Label ID="lblCode" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.Code").ToString)%>' />
                                                    <asp:TextBox ID="txtCode" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.Code").ToString)%>' CssStyle="display:none;"></asp:TextBox>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtCode" runat="server" CssClass="txt"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Queue Name" ControlStyle-Width="150">
                                                <HeaderStyle Width="150" />
                                                <ItemStyle Wrap="true" Width="150" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblQueueName" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.QueueName").ToString)%>' />
                                                    <asp:TextBox ID="txtQueueName" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.QueueName").ToString)%>' OnTextChanged="txtQueueName_TextChanged"></asp:TextBox>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtQueueName" runat="server" CssClass="txt"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Queue Name New" Visible="False">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblQueueNameNew" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.QueueNameNew").ToString)%>' />
                                                    <asp:TextBox ID="txtQueueNameNew" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.QueueNameNew").ToString)%>' OnTextChanged="txtQueueNameNew_TextChanged"></asp:TextBox>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtQueueNameNew" runat="server" CssClass="txt"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <%--DDL--%>
                                            <asp:TemplateField HeaderText="Queue Type" ControlStyle-Width="120">
                                                <HeaderStyle Width="120" />
                                                <ItemStyle Wrap="true" Width="120" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblQueueType" runat="server" CssClass="lbl hide" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.Queue_Status").ToString)%>' />
                                                    <asp:DropDownList ID="ddlQueueType" runat="server" CssClass="ddl" OnSelectedIndexChanged="ddlQueueType_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:DropDownList ID="ddlQueueType" runat="server" CssClass="ddl"></asp:DropDownList>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Product Name" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblProductCode" CssClass="lbl hide" runat="server" Text='Not Bound yet' />
                                                    <asp:TextBox ID="txtProductCode" runat="server" CssClass="txt" Text='Not Bound yet' OnTextChanged="txtProductCode_TextChanged"></asp:TextBox>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtProductCode" runat="server" CssClass="txt"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Scheme Name" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblProductName" CssClass="lbl hide" runat="server" Text='Not Bound yet' />
                                                    <asp:TextBox ID="txtProductName" runat="server" CssClass="txt" Text='Not Bound yet' OnTextChanged="txtProductName_TextChanged"></asp:TextBox>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtProductName" runat="server" CssClass="txt"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Workflow Type" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblWTM_Code" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WorkflowType").ToString)%>' />
                                                    <asp:TextBox ID="txtWTM_Code" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.WorkflowType").ToString)%>' OnTextChanged="txtWTM_Code_TextChanged"></asp:TextBox>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtWTM_Code" runat="server" CssClass="txt"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <%--DDL--%>
                                            <asp:TemplateField HeaderText="Process Button Enable" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblProcessButtonEnable" runat="server" CssClass="lbl hide" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.ProcessButtonEnable").ToString)%>' />
                                                    <asp:DropDownList ID="ddlProcessButtonEnable" runat="server" CssClass="ddl DDLYN" OnSelectedIndexChanged="ddlProcessButtonEnable_SelectedIndexChanged" AutoPostBack="true">
                                                        <asp:ListItem Value="" Text=""></asp:ListItem>
                                                        <asp:ListItem Value="Y" Text="Y"></asp:ListItem>
                                                        <asp:ListItem Value="N" Text="N"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:DropDownList ID="ddlProcessButtonEnable" runat="server" CssClass="ddl DDLYN">
                                                        <asp:ListItem Value="" Text=""></asp:ListItem>
                                                        <asp:ListItem Value="Y" Text="Y"></asp:ListItem>
                                                        <asp:ListItem Value="N" Text="N"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Process Button Title" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblQM_Next_Button_Caption" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.NextButtonTitle").ToString)%>' />
                                                    <asp:TextBox ID="txtQM_Next_Button_Caption" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.NextButtonTitle").ToString)%>' OnTextChanged="txtQM_Next_Button_Caption_TextChanged"></asp:TextBox>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtQM_Next_Button_Caption" runat="server" CssClass="txt"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Stored Procedure" ItemStyle-Wrap="true" ControlStyle-Width="180">
                                                <HeaderStyle Width="180" />
                                                <ItemStyle Wrap="true" Width="180" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <div style="word-wrap: break-word">
                                                        <asp:Label ID="lblProcessQuery" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.ProcessQuery").ToString)%>' />
                                                        <asp:TextBox ID="txtProcessQuery" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.ProcessQuery").ToString)%>' OnTextChanged="txtProcessQuery_TextChanged"></asp:TextBox>
                                                    </div>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtProcessQuery" runat="server" CssClass="txt"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Stored Procedure Database Name" Visible="false">
                                                <HeaderStyle Width="320" />
                                                <ItemStyle Wrap="true" Width="320" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblQM_SPDataBase_Name" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.SPDatabaseName").ToString)%>' />
                                                    <asp:TextBox ID="txtQM_SPDataBase_Name" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.SPDatabaseName").ToString)%>' OnTextChanged="txtQM_SPDataBase_Name_TextChanged"></asp:TextBox>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtQM_SPDataBase_Name" runat="server" CssClass="txt"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <%--DDL--%>
                                            <asp:TemplateField HeaderText="Initial Queue Event" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblInitQueueEvent" runat="server" CssClass="lbl hide" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.Qm_GLAccountNo").ToString)%>' />
                                                    <asp:DropDownList ID="ddlInitQueueEvent" runat="server" CssClass="ddl" OnSelectedIndexChanged="ddlInitQueueEvent_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:DropDownList ID="ddlInitQueueEvent" runat="server" CssClass="ddl"></asp:DropDownList>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <%--DDL--%>
                                            <asp:TemplateField HeaderText="Success Queue" ControlStyle-Width="100" ItemStyle-Wrap="true" ItemStyle-HorizontalAlign="left">
                                                <HeaderStyle Width="180" />
                                                <ItemStyle Wrap="true" Width="180" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <div style="word-break: break-all">
                                                        <asp:Label ID="lblSuccessQueue" runat="server" CssClass="lbl hide" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.SuccessQueue").ToString)%>' />
                                                        <asp:DropDownList ID="ddlSuccessQueue" runat="server" CssClass="ddl" AutoPostBack="true" OnSelectedIndexChanged="ddlSuccessQueue_SelectedIndexChanged"></asp:DropDownList>
                                                    </div>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:DropDownList ID="ddlSuccessQueue" runat="server" CssClass="ddl" AutoPostBack="true"></asp:DropDownList>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="SuccessQCode" Visible="False" ItemStyle-Wrap="true" ItemStyle-HorizontalAlign="left">
                                                <ItemStyle Wrap="true" Width="180" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <div style="word-break: break-all">
                                                        <asp:Label ID="lblQm_success_queue" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.SuccessQCode").ToString)%>' />
                                                        <asp:TextBox ID="txtQm_success_queue" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.SuccessQCode").ToString)%>' OnTextChanged="txtQm_success_queue_TextChanged"></asp:TextBox>
                                                    </div>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtQm_success_queue" runat="server" CssClass="txt"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <%--DDL--%>
                                            <asp:TemplateField HeaderText="Fail Queue" ControlStyle-Width="100" ItemStyle-Wrap="true" ItemStyle-HorizontalAlign="left">
                                                <HeaderStyle Width="180" />
                                                <ItemStyle Wrap="true" Width="180" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <div style="word-break: break-all">
                                                        <asp:Label ID="lblFailQueue" runat="server" CssClass="lbl hide" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.FailQueue").ToString)%>' />
                                                        <asp:DropDownList ID="ddlFailQueue" runat="server" CssClass="ddl" AutoPostBack="true" OnSelectedIndexChanged="ddlFailQueue_SelectedIndexChanged"></asp:DropDownList>
                                                    </div>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:DropDownList ID="ddlFailQueue" runat="server" CssClass="ddl" AutoPostBack="true"></asp:DropDownList>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="FailQCode" Visible="False" ItemStyle-HorizontalAlign="left">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblQm_fail_queue" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.FailQCode").ToString)%>' />
                                                    <asp:TextBox ID="txtQm_fail_queue" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.FailQCode").ToString)%>' OnTextChanged="txtQm_fail_queue_TextChanged"></asp:TextBox>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtQm_fail_queue" runat="server" CssClass="txt"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Success Link Label" Visible="False">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblSuccessLinkLabel" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.SuccessLinkLabel").ToString)%>' />
                                                    <asp:TextBox ID="txtSuccessLinkLabel" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.SuccessLinkLabel").ToString)%>' OnTextChanged="txtSuccessLinkLabel_TextChanged"></asp:TextBox>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtSuccessLinkLabel" runat="server" CssClass="txt"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Failure Link Label" Visible="False">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblFailureLinkLabel" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.FailureLinkLabel").ToString)%>' />
                                                    <asp:TextBox ID="txtFailureLinkLabel" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.FailureLinkLabel").ToString)%>' OnTextChanged="txtFailureLinkLabel_TextChanged"></asp:TextBox>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtFailureLinkLabel" runat="server" CssClass="txt"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <%--DDL--%>
                                            <asp:TemplateField HeaderText="Back Button Enable" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblBackButtonEnable" runat="server" CssClass="lbl hide" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.BackButtonEnable").ToString)%>' />
                                                    <asp:DropDownList ID="ddlBackButtonEnable" runat="server" CssClass="ddl DDLYN" OnSelectedIndexChanged="ddlBackButtonEnable_SelectedIndexChanged" AutoPostBack="true">
                                                        <asp:ListItem Value="" Text=""></asp:ListItem>
                                                        <asp:ListItem Value="Y" Text="Y"></asp:ListItem>
                                                        <asp:ListItem Value="N" Text="N"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:DropDownList ID="ddlBackButtonEnable" runat="server" CssClass="ddl DDLYN">
                                                        <asp:ListItem Value="" Text=""></asp:ListItem>
                                                        <asp:ListItem Value="Y" Text="Y"></asp:ListItem>
                                                        <asp:ListItem Value="N" Text="N"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Back Button Title" Visible="False">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblQM_Back_Button_Caption" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.BackButtonTitle").ToString)%>' />
                                                    <asp:TextBox ID="txtQM_Back_Button_Caption" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.BackButtonTitle").ToString)%>' OnTextChanged="txtQM_Back_Button_Caption_TextChanged"></asp:TextBox>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtQM_Back_Button_Caption" runat="server" CssClass="txt"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Visible Buttons" ControlStyle-Width="250" ItemStyle-Wrap="true">
                                                <HeaderStyle Width="300" />
                                                <ItemStyle Wrap="true" Width="300" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <div style="word-break: break-all">
                                                        <asp:Label ID="lblVisibleButtons" CssClass="hide " runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.Buttons").ToString)%>' />
                                                        <asp:TextBox ID="txtVisibleButtons" runat="server" CssClass="txt" AutoPostBack="true" ReadOnly="false" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.Buttons").ToString)%>' OnTextChanged="txtVisibleButtons_TextChanged"></asp:TextBox>
                                                    </div>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtVisibleButtons" runat="server" CssClass="txt" ReadOnly="true"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Back SP Name" Visible="False">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblBackSPName" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.BackSPName").ToString)%>' />
                                                    <asp:TextBox ID="txtBackSPName" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.BackSPName").ToString)%>' OnTextChanged="txtBackSPName_TextChanged"></asp:TextBox>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtBackSPName" runat="server" CssClass="txt"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <%--DDL--%>
                                            <asp:TemplateField HeaderText="Back Click Queue" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblBackClickQueue" runat="server" CssClass="lbl hide" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.BackSuccessQueue").ToString)%>' />
                                                    <asp:DropDownList ID="ddlBackClickQueue" runat="server" CssClass="ddl" AutoPostBack="true" OnSelectedIndexChanged="ddlBackClickQueue_SelectedIndexChanged"></asp:DropDownList>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:DropDownList ID="ddlBackClickQueue" runat="server" CssClass="ddl" AutoPostBack="true"></asp:DropDownList>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <%--DDL--%>
                                            <asp:TemplateField HeaderText="Back Fail Queue" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblBackFailQueue" runat="server" CssClass="lbl hide" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.BackFailQueue").ToString)%>' />
                                                    <asp:DropDownList ID="ddlBackFailQueue" runat="server" CssClass="ddl" OnSelectedIndexChanged="ddlBackFailQueue_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:DropDownList ID="ddlBackFailQueue" runat="server" CssClass="ddl"></asp:DropDownList>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <%--DDL--%>
                                            <asp:TemplateField HeaderText="Drop Into Pending Tab" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblDropPendingTab" runat="server" CssClass="lbl hide" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.PendingYN").ToString)%>' />
                                                    <asp:DropDownList ID="ddlDropPendingTab" runat="server" CssClass="ddl DDLYN" OnSelectedIndexChanged="ddlDropPendingTab_SelectedIndexChanged">
                                                        <asp:ListItem Value="" Text=""></asp:ListItem>
                                                        <asp:ListItem Value="Y" Text="Y"></asp:ListItem>
                                                        <asp:ListItem Value="N" Text="N"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:DropDownList ID="ddlDropPendingTab" runat="server" CssClass="ddl DDLYN">
                                                        <asp:ListItem Value="" Text=""></asp:ListItem>
                                                        <asp:ListItem Value="Y" Text="Y"></asp:ListItem>
                                                        <asp:ListItem Value="N" Text="N"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="User Group Access Permission" ControlStyle-Width="150" ItemStyle-Wrap="false">
                                                <HeaderStyle Width="150" />
                                                <ItemStyle Wrap="true" Width="150" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <div style="word-break: break-all">
                                                        <asp:Label ID="lblQMPermission" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.QMPermission").ToString)%>' />
                                                        <%--OnTextChanged="txtQMPermission_TextChanged"--%>
                                                        <asp:TextBox ID="txtQMPermission" runat="server" CssClass="txt" ReadOnly="false" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.QMPermission").ToString)%>'  AutoPostBack="true"></asp:TextBox>
                                                    </div>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtQMPermission" runat="server" CssClass="txt" ReadOnly="true"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Display Priority" ControlStyle-Width="50">
                                                <HeaderStyle Width="50" />
                                                <ItemStyle Wrap="true" Width="50" HorizontalAlign="right" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblQM_Priority" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.QM_Priority").ToString)%>' />
                                                    <asp:TextBox ID="txtQM_Priority" runat="server" CssClass="txt" OnKeyPress=" return AllowNumericOnly(this);" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.QM_Priority").ToString)%>' OnTextChanged="txtQM_Priority_TextChanged"></asp:TextBox>
                                                </ItemTemplate>
                                               <%-- <EditItemTemplate>
                                                    <asp:TextBox ID="txtQM_Priority" runat="server" CssClass="txt" OnKeyPress=" return AllowNumericOnly(this);" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.QM_Priority").ToString)%>'></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>


                                            <asp:TemplateField HeaderText="Queue Backcolor" Visible="True" ControlStyle-Width="70">
                                                <HeaderStyle Width="70px" />
                                                <ItemStyle Wrap="true" Width="70px" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblColour" CssClass="hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Queue_Colour").ToString)%>' />
                                                    <asp:Label ID="lblColour1" CssClass="hide" runat="server" Visible="false" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Queue_Colour").ToString)%>' />

                                                    <asp:TextBox ID="txtColour" runat="server" CssClass="txt" AutoPostBack="true"></asp:TextBox>
                                                    <cc1:ColorPickerExtender ID="txtColor_ColorPickerExtender" TargetControlID="txtColour" Enabled="True" runat="server" OnClientColorSelectionChanged="Color_Changed"></cc1:ColorPickerExtender>
                                                </ItemTemplate>
                                               <%-- <EditItemTemplate>
                                                    <asp:TextBox ID="txtColour" runat="server" CssClass="txt" AutoPostBack="true"></asp:TextBox>
                                                    <cc1:ColorPickerExtender ID="txtColor_ColorPickerExtender" TargetControlID="txtColour" Enabled="True" runat="server" OnClientColorSelectionChanged="Color_Changed"></cc1:ColorPickerExtender>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Queue Forecolor" Visible="True" ControlStyle-Width="70">
                                                <HeaderStyle Width="70px" />
                                                <ItemStyle Wrap="true" Width="70px" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblforeColour" CssClass="hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Queue_Forecolor").ToString)%>' />
                                                    <asp:Label ID="lblforeColour1" CssClass="hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Queue_Forecolor").ToString)%>' Visible="false" />

                                                    <asp:TextBox ID="txtforeColour" runat="server" CssClass="txt" AutoPostBack="true" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Queue_Forecolor").ToString)%>'></asp:TextBox>
                                                    <cc1:ColorPickerExtender ID="txtColor_ForeColorPickerExtender" TargetControlID="txtforeColour" Enabled="True" runat="server" OnClientColorSelectionChanged="Color_Changed"></cc1:ColorPickerExtender>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtforeColour" runat="server" CssClass="txt" AutoPostBack="true"></asp:TextBox>
                                                    <cc1:ColorPickerExtender ID="txtColor_ForeColorPickerExtender" TargetControlID="txtforeColour" Enabled="True" runat="server" OnClientColorSelectionChanged="Color_Changed"></cc1:ColorPickerExtender>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Auto Process Y/N" ControlStyle-Width="50"><%--column position changed --%>
                                                <HeaderStyle Width="50" />
                                                <ItemStyle Wrap="true" Width="50" HorizontalAlign="center" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblAutoProc" runat="server" CssClass="lbl hide" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.AutoProcessYN").ToString)%>' />
                                                    <asp:DropDownList ID="ddlAutoProc" runat="server" CssClass="ddl DDLYN" OnSelectedIndexChanged="ddlAutoProc_SelectedIndexChanged" AutoPostBack="true">
                                                        <asp:ListItem Value="" Text=""></asp:ListItem>
                                                        <asp:ListItem Value="Y" Text="Y"></asp:ListItem>
                                                        <asp:ListItem Value="N" Text="N"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:DropDownList ID="ddlAutoProc" runat="server" CssClass="ddl DDLYN">
                                                        <asp:ListItem Value="" Text=""></asp:ListItem>
                                                        <asp:ListItem Value="Y" Text="Y"></asp:ListItem>
                                                        <asp:ListItem Value="N" Text="N"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Manual Push Allowed Queues" ControlStyle-Width="50" ItemStyle-Wrap="true">
                                                <HeaderStyle Width="50" />
                                                <ItemStyle Wrap="true" Width="50" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblAllowedQueues" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.AllowedQueues").ToString)%>' />
                                                    <asp:TextBox ID="txtAllowedQueues" runat="server" CssClass="txt" ReadOnly="true" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.AllowedQueues").ToString)%>'  OnTextChanged="txtAllowedQueues_TextChanged"></asp:TextBox>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtAllowedQueues" runat="server" CssClass="txt" ReadOnly="true"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Screen Caption" ControlStyle-Width="50" ItemStyle-Wrap="true">
                                                <HeaderStyle Width="50" />
                                                <ItemStyle Wrap="true" Width="50" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblQM_Screen_Caption" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.Screen_Caption").ToString)%>' />
                                                    <asp:TextBox ID="txtQM_Screen_Caption" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.Screen_Caption").ToString)%>' OnTextChanged="txtQM_Screen_Caption_TextChanged"></asp:TextBox>
                                                </ItemTemplate>
                                               <%-- <EditItemTemplate>
                                                    <asp:TextBox ID="txtQM_Screen_Caption" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.Screen_Caption").ToString)%>'></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Right Click Actions" ControlStyle-Width="50" ItemStyle-Wrap="true">
                                                <HeaderStyle Width="50" />
                                                <ItemStyle Wrap="true" Width="60" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblRightClickAction" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.RightClickAction").ToString)%>' />
                                                    <asp:TextBox ID="txtRightClickAction" runat="server" CssClass="txt" ReadOnly="true" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.RightClickAction").ToString)%>' OnTextChanged="txtRightClickAction_TextChanged"></asp:TextBox>
                                                </ItemTemplate>
                                               <%-- <EditItemTemplate>
                                                    <asp:TextBox ID="txtRightClickAction" runat="server" CssClass="txt" ReadOnly="true"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <%--DDL--%>
                                            <asp:TemplateField HeaderText="Select Multiple Tokens" ControlStyle-Width="50" ItemStyle-Wrap="true">
                                                <HeaderStyle Width="50" />
                                                <ItemStyle Wrap="true" Width="50" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblSelectMultipleToken" runat="server" CssClass="lbl hide" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.QM_Select_Multiple_Tokens").ToString)%>' />
                                                    <asp:DropDownList ID="ddlSelectMultipleToken" runat="server" CssClass="ddl DDLYN" OnSelectedIndexChanged="ddlSelectMultipleToken_SelectedIndexChanged" AutoPostBack="true">
                                                        <asp:ListItem Value="" Text=""></asp:ListItem>
                                                        <asp:ListItem Value="Y" Text="Y"></asp:ListItem>
                                                        <asp:ListItem Value="N" Text="N"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:DropDownList ID="ddlSelectMultipleToken" runat="server" CssClass="ddl DDLYN">
                                                        <asp:ListItem Value="" Text=""></asp:ListItem>
                                                        <asp:ListItem Value="Y" Text="Y"></asp:ListItem>
                                                        <asp:ListItem Value="N" Text="N"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <%--DDL--%>
                                            <asp:TemplateField HeaderText="Accept Document Changes" ControlStyle-Width="50" ItemStyle-Wrap="true">
                                                <HeaderStyle Width="50" />
                                                <ItemStyle Wrap="true" Width="50" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblAcceptDocChanges" runat="server" CssClass="lbl hide " Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.QM_Accept_Document_Changes").ToString)%>' />
                                                    <asp:DropDownList ID="ddlAcceptDocChanges" runat="server" CssClass="ddl DDLYN" OnSelectedIndexChanged="ddlAcceptDocChanges_SelectedIndexChanged" AutoPostBack="true">
                                                        <asp:ListItem Value="" Text=""></asp:ListItem>
                                                        <asp:ListItem Value="Y" Text="Y"></asp:ListItem>
                                                        <asp:ListItem Value="N" Text="N"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:DropDownList ID="ddlAcceptDocChanges" runat="server" CssClass="ddl DDLYN">
                                                        <asp:ListItem Value="" Text=""></asp:ListItem>
                                                        <asp:ListItem Value="Y" Text="Y"></asp:ListItem>
                                                        <asp:ListItem Value="N" Text="N"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <%--DDL--%>
                                            <asp:TemplateField HeaderText="Auto Docgen Y/N" ControlStyle-Width="50">
                                                <HeaderStyle Width="50" />
                                                <ItemStyle Wrap="true" Width="50" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblAutoDocgen" runat="server" CssClass="lbl hide" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.QM_Auto_Docgen_YN").ToString)%>' />
                                                    <asp:DropDownList ID="ddlAutoDocgen" runat="server" CssClass="ddl DDLYN" OnSelectedIndexChanged="ddlAutoDocgen_SelectedIndexChanged" AutoPostBack="true">
                                                        <asp:ListItem Value="" Text=""></asp:ListItem>
                                                        <asp:ListItem Value="Y" Text="Y"></asp:ListItem>
                                                        <asp:ListItem Value="N" Text="N"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:DropDownList ID="ddlAutoDocgen" runat="server" CssClass="ddl DDLYN">
                                                        <asp:ListItem Value="" Text=""></asp:ListItem>
                                                        <asp:ListItem Value="Y" Text="Y"></asp:ListItem>
                                                        <asp:ListItem Value="N" Text="N"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <%--DDL--%>


                                            <asp:TemplateField HeaderText="Read Only Access" ControlStyle-Width="50" ItemStyle-Wrap="true">
                                                <HeaderStyle Width="50" />
                                                <ItemStyle Wrap="true" Width="50" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblQM_Read_Only_YN" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.ReadOnlyAccess").ToString)%>' />
                                                    <asp:DropDownList ID="ddlQM_Read_Only_YN" runat="server" CssClass="ddl" OnSelectedIndexChanged="ddlQM_Read_Only_YN_SelectedIndexChanged" AutoPostBack="true">
                                                        <asp:ListItem Value="" Text=""></asp:ListItem>
                                                        <asp:ListItem Value="Y" Text="Y"></asp:ListItem>
                                                        <asp:ListItem Value="N" Text="N"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:DropDownList ID="ddlQM_Read_Only_YN" runat="server" CssClass="ddl">
                                                        <asp:ListItem Value="" Text=""></asp:ListItem>
                                                        <asp:ListItem Value="Y" Text="Y"></asp:ListItem>
                                                        <asp:ListItem Value="N" Text="N"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>




                                            <%--DDL--%>
                                            <asp:TemplateField HeaderText="Run Process" ControlStyle-Width="50">
                                                <HeaderStyle Width="50" />
                                                <ItemStyle Wrap="true" Width="50" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblRunProcess_Default_QType" runat="server" CssClass="lbl hide" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.QM_Default_Queue_Type").ToString)%>' />
                                                    <asp:DropDownList ID="ddlRunProcess_Default_QType" runat="server" CssClass="ddl DDLYN" OnSelectedIndexChanged="ddlRunProcess_Default_QType_SelectedIndexChanged" AutoPostBack="true">
                                                        <asp:ListItem Value=""></asp:ListItem>
                                                        <asp:ListItem Value="All" Text="All"></asp:ListItem>
                                                        <asp:ListItem Value="EOD" Text="EOD"></asp:ListItem>
                                                        <asp:ListItem Value="SOD" Text="SOD"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:DropDownList ID="ddlRunProcess_Default_QType" runat="server" CssClass="ddl DDLYN">
                                                        <asp:ListItem Value=""></asp:ListItem>
                                                        <asp:ListItem Value="All" Text="All"></asp:ListItem>
                                                        <asp:ListItem Value="EOD" Text="EOD"></asp:ListItem>
                                                        <asp:ListItem Value="SOD" Text="SOD"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Time (in min)" ControlStyle-Width="50">
                                                <HeaderStyle Width="50" />
                                                <ItemStyle Wrap="true" Width="50" HorizontalAlign="right" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblTime_Min" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.Time_Min").ToString)%>' />
                                                    <asp:TextBox ID="txtTime_Min" runat="server" CssClass="txt" OnKeyPress=" return AllowNumericOnly(this);" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.Time_Min").ToString)%>' OnTextChanged="txtTime_Min_TextChanged"></asp:TextBox>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtTime_Min" runat="server" CssClass="txt" OnKeyPress=" return AllowNumericOnly(this);"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            
                                             <asp:TemplateField HeaderText="Show on Graph" ControlStyle-Width="50">
                                                <HeaderStyle Width="50" />
                                                <ItemStyle Wrap="true" Width="50" HorizontalAlign="center" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblQMDisplay" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.QM_DisplayOnDashboard").ToString)%>' />
                                                     <asp:DropDownList ID="ddlQMDisplay" runat="server" CssClass="ddl DDLYN">
                                                        <asp:ListItem Value="" Text=""></asp:ListItem>
                                                        <asp:ListItem Value="Y" Text="Y"></asp:ListItem>
                                                        <asp:ListItem Value="N" Text="N"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </ItemTemplate>
                                                
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Updated By" ControlStyle-Width="100">
                                                <HeaderStyle Width="100" />
                                                <ItemStyle Wrap="true" Width="100" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <div style="word-break: break-all">
                                                        <asp:Label ID="lblQMUpdatedBy" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.QMUpdatedBy").ToString)%>' />
                                                        <asp:TextBox ID="txtQMUpdatedBy" runat="server" CssClass="txt" ReadOnly="true" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.QMUpdatedBy").ToString)%>' OnTextChanged="txtQMUpdatedBy_TextChanged"></asp:TextBox>
                                                    </div>
                                                </ItemTemplate>
                                                <%--<EditItemTemplate>
                                                    <asp:TextBox ID="txtQMUpdatedBy" runat="server" CssClass="txt" ReadOnly="true"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Updated At" ControlStyle-Width="200">
                                                <HeaderStyle Width="200" />
                                                <ItemStyle Width="200" HorizontalAlign="center" />
                                                <ItemTemplate>
                                                    <div style="word-break: break-all">
                                                        <asp:Label ID="lblQMUpdatedAt" CssClass="lbl hide" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.QMUpdatedAt").ToString)%>' />
                                                        <asp:TextBox ID="txtQMUpdatedAt" runat="server" CssClass="txt" ReadOnly="true" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container,"DataItem.QMUpdatedAt").ToString)%>' OnTextChanged="txtQMUpdatedAt_TextChanged"></asp:TextBox>
                                                    </div>
                                                </ItemTemplate>
                                               <%-- <EditItemTemplate>
                                                    <asp:TextBox ID="txtQMUpdatedAt" runat="server" CssClass="txt" ReadOnly="true"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>



                                        </Columns>
                                    </asp:GridView>

                                </td>
                            </tr>
                        </table>

                        <%--                            </ContentTemplate>
                        </asp:UpdatePanel>--%>
                    </td>
                </tr>
            </table>

            <asp:Label ID="lblgrpProdct" runat="server" CssClass="lbl textLabels" Text="Product"></asp:Label>
            <asp:DropDownList ID="cboProductName" runat="server" CssClass="ddl" AutoPostBack="true"></asp:DropDownList>
            <asp:Label ID="lblgrpScheme" runat="server" CssClass="lbl textLabels" Text="Scheme"></asp:Label>
            <asp:DropDownList ID="cboproductCode" runat="server" CssClass="ddl" AutoPostBack="true"></asp:DropDownList>

            <asp:Panel ID="grpBtnDetailsLbl" runat="server" CssClass="groupBoxGridsButtons invisible filter">
                <div id="divButtonDetails" runat="server" class="btnDetailsDiv beutifyPopUp">
                    <div id="divButtonDetailsControls">
                        <table>
                            <tr>
                                <td>
                                    <asp:Label ID="lblVisibleBtnInfo" runat="server" CssClass="lbl" Text="Visible Buttons"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td></td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button ID="BtnRCLLoadButton_details" runat="server" Text="Load" CssClass="btn" Width="70px" /></td>
                                <td style="padding-right: 800px">
                                    <asp:Button ID="BtnUpdateButtonsButton_details" runat="server" Text="Update" CssClass="btn btnGroupbox" /></td>
                                <td>
                                    <asp:Button ID="btnClose_Button_details" runat="server" Text="X" CssClass="CloseButton btn" Height="27px" /></td>
                            </tr>
                        </table>

                    </div>
                    <div id="divButtonDetailsGrid">
                        <asp:GridView ID="dgvButton_details" runat="server" AllowSorting="True" AutoGenerateColumns="False" PageSize="10" PagerStyle-Height="32px"
                            AllowPaging="true"
                            CssClass="Grid" ShowHeaderWhenEmpty="True" EmptyDataText="No Records Found">
                            <HeaderStyle CssClass="GridHeader" />
                            <RowStyle CssClass="GridItem" />
                            <FooterStyle CssClass="GridFooter" />
                            <PagerStyle CssClass="GridPager" />

                            <Columns>
                                <asp:TemplateField HeaderText=" ">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="ChkRow_ButtonDetails" runat="server" Checked="false"></asp:CheckBox>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:CommandField HeaderText="Select" ButtonType="Link" ShowEditButton="true" EditText="Edit" UpdateText="" />

                                <asp:TemplateField HeaderText="Available Buttons">
                                    <ItemTemplate>
                                        <asp:Label ID="lblWB_CaptionButton_details" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Wb_Caption").ToString)%>' />
                                    </ItemTemplate>
                                    <%-- <EditItemTemplate>
                                <asp:TextBox ID="txtWB_CaptionButton_details" runat="server" CssClass="txt"></asp:TextBox>
                            </EditItemTemplate>--%>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Success Queue" HeaderStyle-Width="200px">
                                    <ItemTemplate>
                                        <asp:Label ID="lblSuccessQueueButton_details" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.SuccessQueueName").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlSuccessQueueButton_details" runat="server" CssClass="ddl" AutoPostBack="false"></asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Fail Queue" HeaderStyle-Width="200px">
                                    <ItemTemplate>
                                        <asp:Label ID="lblFailQueueButton_details" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FailQueueName").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlFailQueueButton_details" runat="server" CssClass="ddl" AutoPostBack="false"></asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Enabled">
                                    <ItemTemplate>
                                        <asp:Label ID="lblEnabledButton_details" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.QBM_Enabled_YN").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlEnabledButton_details" runat="server" CssClass="ddl" AutoPostBack="false">
                                            <asp:ListItem Value="" Text=""></asp:ListItem>
                                            <asp:ListItem Value="Y" Text="Y"></asp:ListItem>
                                            <asp:ListItem Value="N" Text="N"></asp:ListItem>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>

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

                                    <%--      <asp:TextBox ID="txtWB_IDButton_details" runat="server" CssClass="txt" AutoPostBack="true"></asp:TextBox>--%>
                      
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="SP" HeaderStyle-Width="200px">
                                    <ItemTemplate>
                                        <asp:Label ID="lblSPButton_details" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.QBM_SP").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtSPButton_details" runat="server" CssClass="txt" AutoPostBack="false"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Text1">
                                    <ItemTemplate>
                                        <asp:Label ID="lblText1Button_details" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.QBM_Text1").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtText1Button_details" runat="server" CssClass="txt" AutoPostBack="false"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Text2">
                                    <ItemTemplate>
                                        <asp:Label ID="lblText2Button_details" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.QBM_Text2").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtText2Button_details" runat="server" CssClass="txt" AutoPostBack="false"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Text3">
                                    <ItemTemplate>
                                        <asp:Label ID="lblText3Button_details" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.QBM_Text3").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtText3Button_details" runat="server" CssClass="txt" AutoPostBack="false"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </div>
                </div>
                <div id="overlayDivBtn" class="overlaySearch"></div>
            </asp:Panel>

            <asp:Panel ID="grpUsergroup" runat="server" CssClass="invisible">
                <div id="divUsrAcc" runat="server" class="btnDetailsDiv groupBoxUserAccess beutifyPopUp">
                    <div id="divUserAccessControls">
                        <table>
                            <tr>
                                <td>
                                    <asp:Label ID="lblUserGroupInfo" runat="server" CssClass="lbl" Text="User group Access Permission"></asp:Label>
                                </td>
                            </tr>

                            <tr>
                                <td></td>
                            </tr>

                            <tr>
                                <td>
                                    <asp:TextBox ID="txtUsername_UserDetails_popup" runat="server"></asp:TextBox></td>
                                <td>
                                    <asp:Button ID="btnLoadGrp_UserDetails" runat="server" Text="Load" CssClass="btn btnGroupbox" /></td>
                                <td>
                                    <asp:Button ID="btnSaveGrp_UserDetails" runat="server" Text="Save" CssClass="btn btnGroupbox" /></td>
                                <td>
                                    <asp:Button ID="btnCloseGrp_UserDetails" runat="server" Text="X" CssClass="btn CloseButton" /></td>
                            </tr>
                        </table>
                    </div>
                    <div id="divUserAccessGrid">
                        <asp:GridView ID="dgv_Q_User_Group" runat="server" AllowSorting="True" PageSize="10" PagerStyle-Height="32px" AllowPaging="false"
                            AutoGenerateColumns="False" CssClass="Grid" ShowHeaderWhenEmpty="True" EmptyDataText="No Records Found" Width="340px" EnableViewState="true">
                            <HeaderStyle CssClass="GridHeader" />
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="false" />
                            <Columns>
                                <asp:TemplateField ControlStyle-Width="25px">
                                    <HeaderStyle HorizontalAlign="Center" Width="25px" Wrap="True" />
                                    <ItemStyle HorizontalAlign="Center" Width="25px" Wrap="True" />
                                    <HeaderTemplate>
                                        <asp:CheckBox ID="chkbox_UserQGrpAll" EnableViewState="true" runat="server" onclick="checkAll(this);" />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkbox_UserQGrp" EnableViewState="true" runat="server" onclick="Check_Click(this)" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="User ID">
                                    <ItemTemplate>
                                        <asp:Label ID="lblU_ID_UserDetails" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.U_Id").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtU_ID_UserDetails" runat="server" CssClass="txt" AutoPostBack="true"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="User Name">
                                    <ItemTemplate>
                                        <asp:Label ID="lblU_Name_UserDetails" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.NAME").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtU_Name_UserDetails" runat="server" CssClass="txt" AutoPostBack="true"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="QUG_ID" Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="lblQUG_ID_UserDetails" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.QUG_ID").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtQUG_ID_UserDetails" runat="server" CssClass="txt" AutoPostBack="true"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </div>

                </div>
                <div id="overlayDiv" class="overlaySearch"></div>
            </asp:Panel>

            <asp:Panel ID="grpAllowedQueue" runat="server" CssClass="invisible">

                <div id="divAllowedQ" runat="server" class="btnDetailsDivAllowedQueue groupBoxUserAccess beutifyPopUp">
                    <div id="divAllowedQControls">
                        <table>
                            <tr>
                                <td>
                                    <asp:Label ID="lblAllowedQueueInfo" runat="server" CssClass="lbl" Text="Manual Push Allowed Queues"></asp:Label>
                                </td>
                            </tr>

                            <tr>
                                <td></td>
                            </tr>

                            <tr>
                                <td>
                                    <asp:TextBox ID="txtAllowedQ_AllowedQ" runat="server"></asp:TextBox></td>
                                <td>
                                    <asp:Button ID="btnLoad_AllowedQ" runat="server" Text="Load" CssClass="btn btnGroupbox1" /></td>
                                <td>
                                    <asp:Button ID="btnSave_AllowedQ" runat="server" Text="Save" CssClass="btn btnGroupbox1" /></td>
                                <td>
                                    <asp:Button ID="btnClose_AllowedQ" runat="server" Text="X" CssClass="btn CloseButton" /></td>


                            </tr>
                        </table>
                    </div>
                    <div id="divAllowedQGrid">
                        <asp:GridView ID="dgv_AllowedQueue" runat="server" AllowSorting="True" PageSize="10" PagerStyle-Height="32px"
                            AllowPaging="false" AutoGenerateColumns="False" CssClass="Grid" ShowHeaderWhenEmpty="True" EmptyDataText="No Records Found">
                            <%-- Width="320px"--%>
                            <RowStyle CssClass="GridItem" />
                            <HeaderStyle CssClass="GridHeader" />
                            <FooterStyle CssClass="GridFooter" />
                            <PagerStyle CssClass="GridPager" />
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkbox_AllowedQ" runat="server" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Queue Name" HeaderStyle-Width="150px" Visible="true">
                                    <ItemTemplate>
                                        <asp:Label ID="lblQueue_Name_AllowedQ" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.QM_Name").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtQueue_Name_AllowedQ" runat="server" CssClass="txt" AutoPostBack="true"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Queue Id" Visible="true">
                                    <ItemTemplate>
                                        <asp:Label ID="lblQM_ID_AllowedQ" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.QM_ID").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtQM_ID_AllowedQ" runat="server" CssClass="txt" AutoPostBack="true"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </div>
                </div>

                <div id="overlayDivAllowedQueue" class="overlaySearch"></div>

            </asp:Panel>

            <asp:Panel ID="grpRightClickLabel" runat="server" CssClass="groupBoxGridsRightClickAction invisible filter">
                <div id="divRightClickAction" runat="server" class="btnDetailsDiv">
                    <div id="divRightClickActionControls">
                        <asp:TextBox ID="txtRightClick_RightClick" runat="server"></asp:TextBox>
                        <asp:Button ID="btnLoad_RightClick" runat="server" Text="Load" CssClass="btn btnGroupbox" />
                        <asp:Button ID="btnSave_RightClick" runat="server" Text="Save" CssClass="btn btnGroupbox" />
                        <asp:Button ID="btnClose_RightClick" runat="server" Text="X" CssClass="btn CloseButton" />
                    </div>
                    <div id="divRightClickActionGrid">
                        <asp:GridView ID="dgvRightClick" runat="server" AllowSorting="True" PageSize="10" PagerStyle-Height="32px"
                            AllowPaging="true"
                            AutoGenerateColumns="False" CssClass="Grid" ShowHeaderWhenEmpty="True" EmptyDataText="No Records Found">
                            <%-- Width="335px"--%>
                            <RowStyle CssClass="GridItem" />
                            <HeaderStyle CssClass="GridHeader" />
                            <FooterStyle CssClass="GridFooter" />
                            <PagerStyle CssClass="GridPager" />

                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkbox_RightClick" runat="server" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Action" Visible="true" HeaderStyle-Width="165px">
                                    <ItemTemplate>
                                        <asp:Label ID="lblAction_RightClick" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RCA_Label").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtAction_RightClick" runat="server" CssClass="txt" AutoPostBack="true"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Display Sequence" Visible="True">
                                    <ItemTemplate>
                                        <asp:Label ID="lblDisplaySeq_RightClick" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.QA_Display_Sequence").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtDisplaySeq_RightClick" runat="server" CssClass="txt" AutoPostBack="true"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="RCA_Id" Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="lblRCA_Id_RightClick" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RCA_ID").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtRCA_Id_RightClick" runat="server" CssClass="txt" AutoPostBack="true"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="QA_ID" Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="lblQA_ID_RightClick" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.QA_ID").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtQA_ID_RightClick" runat="server" CssClass="txt" AutoPostBack="true"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </div>
                </div>
            </asp:Panel>
            </td>
                </tr>
            </table>

        </ContentTemplate>
    </asp:UpdatePanel>

    <script type="text/javascript">

        //Start| 26-JUN-2020 | Added by Rajeshree K for grid filters        
        $(document).ready(function () {
            SetSorting_Filter1();
        });
        //End| 26-JUN-2020 | Added by Rajeshree K for grid filters

        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function () {
            $(document).ready(function () {
                $('[id$="ctl00_MainContent_pnlUserPermission"], .groupBoxGrids').draggable();
                
            });
        })


        function displayVisibleButtonGroupBox(RowP) {
            // document.getElementById('<%=grpBtnDetailsLbl.ClientID%>').style.display = "block";
            
            document.getElementById("overlayDivBtn").style.display = "block";
            document.getElementById('<%=rowIndexBtn.ClientID%>').value = $(RowP).parent().parent().children().index($(RowP).parent()) - 1;

            if (document.getElementById('<%=rowIndexBtn.ClientID%>').value > -1) {
                document.getElementById('<%=BtnRCLLoadButton_details.ClientID%>').click()
            }
        }


        function displayUserAcessGroupBox(RowP) {

            //Open my pop up
            //$(".overlaySearch").show();
            document.getElementById("overlayDiv").style.display = "block";
            document.getElementById('<%=rowIndexUsr.ClientID%>').value = $(RowP).parent().parent().children().index($(RowP).parent()) - 1;
            if (document.getElementById('<%=rowIndexUsr.ClientID%>').value > -1) {
                document.getElementById('<%=btnLoadGrp_UserDetails.ClientID%>').click()
            }
        }
        function displayAllowedQueueGroupBox(RowP) {

            document.getElementById("overlayDivAllowedQueue").style.display = "block";

            document.getElementById('<%=rowIndexAllQ.ClientID%>').value = $(RowP).parent().parent().children().index($(RowP).parent()) - 1;

            if (document.getElementById('<%=rowIndexAllQ.ClientID%>').value > -1) {
                document.getElementById('<%=btnLoad_AllowedQ.ClientID%>').click()
            }
        }

        function displayRightClickGroupBox(RowP) {
            document.getElementById('<%=rowIndexRightClick.ClientID%>').value = $(RowP).parent().parent().children().index($(RowP).parent()) - 1;

            if (document.getElementById('<%=rowIndexRightClick.ClientID%>').value > -1) {
                document.getElementById('<%=btnLoad_RightClick.ClientID%>').click()
            }
        }

        function ViewGraph() {
            var WorkFlow = document.getElementById('<%=cboWFType.ClientID%>');
            var WorkFlowTypeId = WorkFlow.options[WorkFlow.selectedIndex].value;
            var Token_Id = "NULL"
            window.open("WorkFlow_Graph_D3.aspx?WorkFlowTypeId=" + WorkFlowTypeId + "&Token_Id=" + Token_Id + "&Master_Popup=POPUP", "_blank", "", false);
        }
        function AllowNumericOnly(e) {
            var keycode;
            if (window.event)
                keycode = window.event.keyCode;
            else if (event)
                keycode = event.keyCode;
            else if (e)
                keycode = e.which;
            else return true;
            if ((keycode > 47 && keycode <= 57)) { return true; }
            else { return false; } return true;
        }
        //Added by Nikhil Mali for Rows per page - 999 Validations : START
        function EnterKeyEvent(evt) {
            var code = (evt.which) ? evt.which : evt.keyCode;

            if (code == 13) {
                __doPostBack('<%=txtrowsperpage.ClientID%>', 'TextChanged');

            }
        }

        //Added by Nikhil Mali for Rows per page - 999 Validations : END
        function Color_Changed(sender) {

            sender.get_element().value = sender.get_selectedColor();

        }
    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;
                    }
                }
            }
        }



    </script>
</asp:Content>
