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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy11" 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">
        .textLabels {
            font-family: Verdana;
        }
        /*.txtGrpBox
        {
            margin-left:15px;
        }*/
        /*.GridHeader
        {
            color: black !important;
            border: solid 1px #dddddd;
            background-color: #ededed !important;
            padding-left: 6px;
            height: 35px;
        }*/

        /*.Grid th
        {
            background-color: #ededed !important;
        }*/
        .panel {
            top: 250px;
            left: 580px;
            position: absolute;
            display: none;
            z-index:99999   /*13-Sept-2019: Added by Shraddha D for Vertical edit*/
        }

        .UserPermissions {
            height: 330px;
            width: 407px;
            /*position: absolute;
            left: 580px;
            top: 250px;*/
            background-color: #FFFFFF;
            border: solid 1px #CCCCCC;
            /*overflow: auto; Commented by Nikhil Mali || 12-02-2020 || WBDIN-45 || User Group pop-up change*/ 
        }

        .cboInputs {
            width: 150px;
        }

        .fieldset {
            width: 300px;
        }

        /*.btn
        {
            width: 100px !important;
            height: 27px !important;
            border-radius: 5px;
        }*/
        .Visible {
            display: block;
        }

        .invisible {
            display: none;
        }

        .btnGroupbox {
            width: 65px;
        }


        .DDLYN {
            width: 50px;
        }

        .groupBoxGrids {
            position: absolute !important;
            background-color: #f9f9f9;
            left: 744px;
            top: 205px;
            height: 305px !important;
            width: 404px !important;
            /*display: none;*/
        }

        .groupBoxGrids2 {
            position: absolute !important;
            background-color: #f9f9f9;
            left: 744px;
            top: 205px;
            /*height: 310px !important;*/
            width: 489px !important;
            /*display: none;*/
        }

        .btnCommon {
            width: 90px;
        }

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

        .ddlCommon {
            Width: 200px !important;
            margin: 6px;
        }

        .success {
            font-family: Verdana;
            font-size: 10px;
            color: green;
        }

        .fail {
            font-family: Verdana;
            font-size: 10px;
            color: red;
        }

        .InnerTable {
            margin-left: -4px;
            width: 100% !important;
        }

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

        .GridContainerTab {
            width: 464px;
            overflow-y: auto !important;
        }

        .GridContainerTD {
            width: 379px;
            height: 273px; /* Commented by Nikhil Mali || 12-02-2020 || WBDIN-45 || User Group pop-up change */
            overflow-y: auto !important;
        }

        .constantWidth {
            width: 5px;
        }

        .Gridview {
            table-layout: fixed;
            /*width: 100%;*/
        }

        .txtUsername {
            width: 208px;
        }

        .btnClose {
            width: 30px;
        }


        .notify {
            float:left;
            left: 0px;
            top:90px;
            position:absolute;
            background-color:#F7F7F7;
            /* border:solid 0.1em #DDD; */
            height: 10px;
            width:90%;
            /* text-indent:5px; */
            color:#000;
            margin:10px;
            padding:2px;
            z-index:1000;
            FILTER: progid:DXImageTransform.Microsoft.Shadow(direction=135,color=#DDDDDD,strength=3);
            font-size: 11px;
             border:none!IMPORTANT;
        }
         
            .notify span {
                margin-left: 3px;
                float: left;
                width: 95%;
                height: 20px;
                font: normal 11px/20px verdana;
                border-left: solid 0px #aaa;
            }

            .notify .icon {
                width: 24px;
                height: 20px;
                display: none;
                float: left;
                margin-top: 0px;
            }

            .notify .close {
                width: 24px;
                height: 20px;
                font: bold 11px/11px verdana;
                color: #fff;
                float: right;
                cursor: pointer;
            }
			  
			     .info{
            background-color: #fff;
            color: steelblue;
            }
        .lbl {
            white-space: normal !important;
        }
        /*Added By Shubham Podhade on 24-Aug-2019 as told by NikhilP*/ 
        .PaddingToDPColumnElements {
            padding-right: 10px !important;
        }
        /*Added By Shubham Podhade on 24-Aug-2019 as told by NikhilP*/
        .UserGrpPopup {
          z-index: 10000000 !important;
        }
         .overlaySearch {
        z-index:-1 !important;
        background-color: #000000 !important; /* Black background with opacity */
        }
      .divLoading {
            position: absolute;
            top: 40px;
            left: 360px;
        }
    </style>
    <asp:UpdatePanel ID="UpdatePanel5" runat="server">
        <ContentTemplate>
    <table style="padding-bottom: 10px;">
        <tr>
            <td>
                <asp:Label ID="Label2" runat="server" Text="Workflow"></asp:Label>&nbsp;
            </td>
            <td>
                <asp:DropDownList ID="cboWFType" runat="server" CssClass="ddl ddlCommon" AutoPostBack="true" AppendDataBoundItems="true" TabIndex="1">
                </asp:DropDownList>
            </td>
            <td class="constantWidth"></td>
            <td>
                <asp:Button ID="BtnAdd" runat="server" Text="Add" CssClass="btn btnCommon" /></td>
            <td class="constantWidth"></td>
            <td>
                <asp:Button ID="BtnSave" runat="server" Text="Save" CssClass="btn btnCommon" visible="True"/></td>
            <td class="constantWidth"></td>
            <td>
                <asp:Button ID="BtnDelete" runat="server" Text="Delete" CssClass="btn btnCommon" OnClientClick="return confirm('Do you want to perform this Action ?');" /></td>
            <td class="constantWidth"></td>
            <td>
                <asp:Button ID="BtnExport" runat="server" Text="Export" CssClass="btn btnCommon" /></td>
            <td class="constantWidth"></td>
            <td>
                <asp:Button ID="BtnCancel" runat="server" Text="Cancel" CssClass="btn btnCommon" /></td>


            <td class="constantWidth"></td>
             <%--Added by Nikhil Mali for Rows Per Page - 999 : START--%>
                      <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 isNumberKey(event)" />
                     </td>
                     <%--Added by Nikhil Mali for Rows Per Page - 999 : END--%>
            <td class="constantWidth"></td>
            <td>
              
                <asp:Label ID="lblError" runat="server" CssClass="lblError"></asp:Label>
            </td>
             <asp:Label ID="Label1" runat="server" CssClass="lblError"></asp:Label>
              <%-- <asp:Label ID="lblMsgSuccess" runat="server" Text="" CssClass="lbl success" Visible="false" />--%>
            <td class="constantWidth"></td>
            <td>

                <asp:Button ID="btnColor" runat="server" Text="" CssClass="btn btnCommon invisible" /></td>
            <td>
                <asp:Button ID="dgvButton" CssClass="btn invisible" runat="server" Text="" />
            </td>
            <%--<td>
             <input style="width:100px;" id="mycolor" class="colorPicker evo-cp0" />
             <div class="evo-colorind" style="background-color:#8db3e2"></div>  
             </td>--%>
        </tr>


    </table>
    <input id="rowIndexBtnMap" type="hidden" runat="server" />

    <input id="rowIndex1" type="hidden" runat="server" />


    <table>
        <tr>
            <td>
               
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <table>
                            <tr><td>  <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel5"
                                        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>

                        </table>
                           
                        <asp:GridView ID="dgvButtonMst" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                            BorderStyle="Solid" BorderWidth="1px" CellPadding="3" CssClass="Grid Gridview" AllowPaging="true" PageSize="999" ShowHeaderWhenEmpty="true" EnableCallBacks="false" HeaderStyle-CssClass="GridHeaderTitle">
                            <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>
                                    <ItemStyle Width="20px" />
                                    <HeaderStyle Width="20px" />
                                    <ItemTemplate>
                                        <asp:CheckBox ID="CheckboxRow" runat="server" AutoPostBack="true"></asp:CheckBox>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                

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



                                <asp:TemplateField HeaderText="Button Caption" Visible="True" ControlStyle-Width="110">
                                    <HeaderStyle Width="120px" />
                                    <ItemStyle Wrap="true" Width="120px" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblButtonCaption" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Caption").ToString)%>' />
                                  <asp:TextBox ID="txtButtonCaption" runat="server" visible="true" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Caption").ToString)%>'></asp:TextBox>
                                        </ItemTemplate>
                                    
                                </asp:TemplateField>

                                
                                <asp:TemplateField HeaderStyle-Wrap="false" HeaderText="ID" Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="lblID" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_ID").ToString)%>' />
                                   <asp:Label ID="lblID1" runat="server" visible="true" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_ID").ToString)%>' />
                                        </ItemTemplate>
                                    <%--<EditItemTemplate>
                                        <asp:Label ID="lblID1" runat="server" visible="true" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_ID").ToString)%>' />
                                    </EditItemTemplate>--%>
                                </asp:TemplateField>



                                <asp:TemplateField HeaderText="Primary Execution Type" ControlStyle-Width="70">
                                    <HeaderStyle Width="70" />
                                    <ItemStyle Wrap="true" Width="70" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblPrimeExe" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_execution_object_type").ToString)%>'>
                                        </asp:Label>
                                        <asp:DropDownList ID="ddlPrimeExe" runat="server" AutoPostBack="True" CssClass="ddl" visible="true" EnableViewState="true" OnSelectedIndexChanged="RowSelected">
                                        </asp:DropDownList>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Primary Execution Code" Visible="True" ControlStyle-Width="140">
                                    <HeaderStyle Width="140px" />
                                    <ItemStyle Wrap="true" Width="140px" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <div style="word-wrap: break-word">
                                            <asp:Label ID="lblPrimeExeCode" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_execution_object_subtype").ToString)%>' />
                                      <asp:TextBox ID="txtPrimeExeCode" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_execution_object_subtype").ToString)%>'></asp:TextBox>
                                            </div>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Secondary Execution Type" ControlStyle-Width="70">
                                    <HeaderStyle Width="70" />
                                    <ItemStyle Wrap="true" Width="70" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblSecExe" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_execution_object_type_sec").ToString)%>'>
                                        </asp:Label>
                                        <asp:DropDownList ID="ddlSecExe" runat="server" AutoPostBack="True" CssClass="ddl" EnableViewState="true" OnSelectedIndexChanged="RowSelected">
                                        </asp:DropDownList>
                                    </ItemTemplate>
                                    
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Secondary Execution Code" Visible="True" ControlStyle-Width="80">
                                    <HeaderStyle Width="80px" />
                                    <ItemStyle Wrap="true" Width="80px" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <div style="word-wrap: break-word;">
                                        <asp:Label ID="lblPrimeSecCode" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_execution_object_subtype_sec").ToString)%>' />
                                        </div>
                                        <div style="word-wrap: break-word;">
                                            <asp:TextBox ID="txtPrimeSecCode" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_execution_object_subtype_sec").ToString)%>'></asp:TextBox>
                                               </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Success Queue" ControlStyle-Width="140">
                                    <HeaderStyle Width="150" />
                                    <ItemStyle Wrap="true" Width="150" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblSuccessQ" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Process_Success_Queue_Name").ToString)%>'>
                                        </asp:Label>
                                        <asp:DropDownList ID="ddlSuccessQ" runat="server" AutoPostBack="True" CssClass="ddl" Width="120" EnableViewState="true" OnSelectedIndexChanged="RowSelected">
                                        </asp:DropDownList>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Fail Queue" ControlStyle-Width="140">
                                    <HeaderStyle Width="150" />
                                    <ItemStyle Wrap="true" Width="150" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblFailQ" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Process_Fail_Queue_Name").ToString)%>'>
                                        </asp:Label>
                                        <asp:DropDownList ID="ddlFailQ" runat="server" AutoPostBack="True" CssClass="ddl" Width="120" EnableViewState="true" OnSelectedIndexChanged="RowSelected">
                                        </asp:DropDownList>
                                    </ItemTemplate>
                                    
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="User Group Access Permission" ControlStyle-Width="230">
                                    <HeaderStyle Width="230" />
                                    <ItemStyle Wrap="true" Width="230" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <div style="word-wrap: break-word;">
                                            <asp:Label ID="lblUsrGrp" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UserPermission").ToString)%>'>
                                            </asp:Label>
                                            <asp:TextBox ID="txtUsrGrp" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UserPermission").ToString)%>' autopostback="true" >
                                        </asp:TextBox>
                                        </div>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Display Priority" Visible="True"> 
                                    <HeaderStyle Width="45px"  HorizontalAlign="Center"/> <%--Edited By ShubhamPodhade on 24-Aug-2019 As told By Nikhil P ==> WIDTH SET to 45px--%>
                                    <ItemStyle Wrap="true" Width="45px"  HorizontalAlign="Right" CssClass="PaddingToDPColumnElements"  /> <%--Edited By ShubhamPodhade on 24-Aug-2019 As told By Nikhil P ==> Added CSS Class:'PaddingToDPColumnElements'--%>
                                    <ItemTemplate>
                                        <asp:Label ID="lblDisplay" Width="45px" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Display_Priority").ToString)%>' />
                                        <asp:TextBox ID="txtDisplay" Width="45px" runat="server" Style="text-align: right;" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Display_Priority").ToString)%>'></asp:TextBox>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Workflow Visible YN" ControlStyle-Width="50">
                                    <HeaderStyle Width="50" />
                                    <ItemStyle Wrap="true" Width="50" HorizontalAlign="center" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblVisibleYN" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Visible_YN").ToString)%>'>
                                        </asp:Label>
                                        <asp:DropDownList ID="ddlVisibleYN" runat="server" AutoPostBack="True" CssClass="ddl" Width="120" OnSelectedIndexChanged="RowSelected">
                                            <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="WFL Visible" ControlStyle-Width="50">
                                    <HeaderStyle Width="60" />
                                    <ItemStyle Wrap="true" Width="60" HorizontalAlign="center" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblActive_YN" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Active_YN").ToString)%>'>
                                        </asp:Label>
                                        <asp:DropDownList ID="ddlActive_YN" runat="server" AutoPostBack="True" CssClass="ddl" Width="120" OnSelectedIndexChanged="RowSelected">
                                            <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="Stored Procedure" Visible="True" ControlStyle-Width="260"><%-- column width changed--%>
                                    <HeaderStyle Width="260px" />
                                    <ItemStyle Wrap="true" Width="260px" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <div style="word-wrap: break-word">
                                            <asp:Label ID="lblStoredProc" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Process_SP_Name").ToString)%>' />
                                                    <asp:TextBox ID="txtStoredProc" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Process_SP_Name").ToString)%>'></asp:TextBox>
                                        </div>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="Right Click YN" ControlStyle-Width="40"><%-- column width changed--%>
                                    <HeaderStyle Width="40" />
                                    <ItemStyle Wrap="true" Width="40" HorizontalAlign="center" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblEnableYN" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Enable_YN").ToString)%>'>
                                        </asp:Label>
                                                 <asp:DropDownList ID="ddlEnableYN" runat="server" AutoPostBack="True" CssClass="ddl" Width="120" OnSelectedIndexChanged="RowSelected">
                                            <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="Button Colour" Visible="True" ControlStyle-Width="60"><%-- column width changed--%>
                                    <HeaderStyle Width="60px" />
                                    <ItemStyle Wrap="true" Width="60px" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblColour" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Color_YN").ToString)%>' />
                                        <asp:Label ID="lblColour1" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Color_YN").ToString)%>' Visible="false" />
                                        <asp:TextBox ID="txtColour" runat="server" CssClass="txt" AutoPostBack="true" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Color_YN").ToString)%>'></asp:TextBox>
                                        <cc1:ColorPickerExtender ID="txtColor_ColorPickerExtender" TargetControlID="txtColour" Enabled="True" runat="server"></cc1:ColorPickerExtender>
                                    </ItemTemplate>
                                    <%--<EditItemTemplate>
                                        <asp:TextBox ID="txtColour" runat="server" CssClass="txt" AutoPostBack="true" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Color_YN").ToString)%>'></asp:TextBox>
                                        <cc1:ColorPickerExtender ID="txtColor_ColorPickerExtender" TargetControlID="txtColour" Enabled="True" runat="server"></cc1:ColorPickerExtender>
                                    </EditItemTemplate>--%>
                                </asp:TemplateField>                               

                                <asp:TemplateField HeaderText="Display PopUp YN" Visible="True" ControlStyle-Width="50">
                                    <HeaderStyle Width="50px" />
                                    <ItemStyle Wrap="true" Width="50px" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblDisPopUpYN" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Display_PopUp_YN").ToString)%>' />
                                               <asp:DropDownList ID="ddlDisPopUpYN" runat="server" AutoPostBack="True" CssClass="ddl" Width="120" OnSelectedIndexChanged="RowSelected">
                                            <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="PopUp Message" Visible="True" ControlStyle-Width="80">
                                    <HeaderStyle Width="80px" />
                                    <ItemStyle Wrap="true" Width="120px" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblPopUpMsg" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_PopUpMessage").ToString)%>' />
                                             <asp:TextBox ID="txtPopUpMsg" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_PopUpMessage").ToString)%>'></asp:TextBox>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="SubType" Visible="True" ControlStyle-Width="70">
                                    <HeaderStyle Width="70px" />
                                    <ItemStyle Wrap="true" Width="70px" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblSubType" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_SubType").ToString)%>' />
                                            <asp:TextBox ID="txtSubType" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_SubType").ToString)%>'></asp:TextBox>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Remark1" Visible="True" ControlStyle-Width="70">
                                    <HeaderStyle Width="70px" />
                                    <ItemStyle Wrap="true" Width="70px" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblRemark1" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Remark1").ToString)%>' />
                                        <asp:TextBox ID="txtRemark1" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Remark1").ToString)%>'></asp:TextBox>
                                        </ItemTemplate>
                                   
                                </asp:TemplateField>


                                <asp:TemplateField HeaderText="Remark2" Visible="True" ControlStyle-Width="70">
                                    <HeaderStyle Width="70px" />
                                    <ItemStyle Wrap="true" Width="70px" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblRemark2" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Remark2").ToString)%>' />
                                             <asp:TextBox ID="txtRemark2" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Remark2").ToString)%>'></asp:TextBox>
                                    </ItemTemplate>
                                   
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Remark3" Visible="True" ControlStyle-Width="70">
                                    <HeaderStyle Width="70px" />
                                    <ItemStyle Wrap="true" Width="70px" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblRemark3" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Remark3").ToString)%>' />
                                             <asp:TextBox ID="txtRemark3" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Remark3").ToString)%>'></asp:TextBox>
                                    </ItemTemplate>
                                    
                                </asp:TemplateField>

                                 <asp:TemplateField HeaderText="UDFCondition" Visible="True" ControlStyle-Width="100">
                                            <HeaderStyle Width="100px" />
                                            <ItemStyle Wrap="true" Width="100px" HorizontalAlign="left" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblWBUdfCondition" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_UDFCondition").ToString)%>' />
                                            <asp:TextBox ID="txtWBUdfCondition" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_UDFCondition").ToString)%>'></asp:TextBox>
                                            </ItemTemplate>
                                          
                                        </asp:TemplateField>

                                         <asp:TemplateField HeaderText="UDFConditionRemark" Visible="True" ControlStyle-Width="150">
                                            <HeaderStyle Width="100px" />
                                            <ItemStyle Wrap="true" Width="150px" HorizontalAlign="left" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblUDFConditionRemark" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_UDFConditionRemark").ToString)%>' />
                                                <asp:TextBox ID="txtUDFConditionRemark" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_UDFConditionRemark").ToString)%>'></asp:TextBox>
                                            </ItemTemplate>                                            
                                        </asp:TemplateField>
                                         <asp:TemplateField HeaderText="Condition" Visible="True" ControlStyle-Width="100">
                                            <HeaderStyle Width="100px" />
                                            <ItemStyle Wrap="true" Width="100px" HorizontalAlign="left" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblWB_Condition" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Condition").ToString)%>' />
                                                <asp:TextBox ID="txtWB_Condition" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Condition").ToString)%>'></asp:TextBox>
                                            </ItemTemplate>                                            
                                        </asp:TemplateField>
                                         <asp:TemplateField HeaderText="EditUCPColumns" Visible="True" ControlStyle-Width="150">
                                            <HeaderStyle Width="100px" />
                                            <ItemStyle Wrap="true" Width="150px" HorizontalAlign="left" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblWB_EditUCPColumns" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_EditUCPColumns").ToString)%>' />
                                                <asp:TextBox ID="txtWB_EditUCPColumns" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_EditUCPColumns").ToString)%>'></asp:TextBox>
                                            </ItemTemplate>
                                            
                                        </asp:TemplateField>
                                 <%--  Added by Jyoti K on 12 Aug 2021 | Start--%>
                                 <asp:TemplateField HeaderText="Misc1" Visible="True" ControlStyle-Width="70">
                                            <HeaderStyle Width="70px" />
                                            <ItemStyle Wrap="true" Width="70px" HorizontalAlign="left" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblMisc1" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Misc1").ToString)%>' />                                            
                                                <asp:TextBox ID="txtMisc1" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Misc1").ToString)%>'></asp:TextBox>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Misc3" Visible="True" ControlStyle-Width="70">
                                            <HeaderStyle Width="70px" />
                                            <ItemStyle Wrap="true" Width="70px" HorizontalAlign="left" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblMisc3" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Misc3").ToString)%>' />   
                                                <asp:TextBox ID="txtMisc3" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Misc3").ToString)%>'></asp:TextBox>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Misc4" Visible="True" ControlStyle-Width="70">
                                            <HeaderStyle Width="70px" />
                                            <ItemStyle Wrap="true" Width="70px" HorizontalAlign="left" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblMisc4" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Misc4").ToString)%>' />                                           
                                                <asp:TextBox ID="txtMisc4" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Misc4").ToString)%>'></asp:TextBox>
                                            </ItemTemplate>
                                        </asp:TemplateField>                                      

                                         <asp:TemplateField HeaderText="Misc5" Visible="True" ControlStyle-Width="70">
                                            <HeaderStyle Width="70px" />
                                            <ItemStyle Wrap="true" Width="70px" HorizontalAlign="left" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblMisc5" runat="server" Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Misc5").ToString)%>' />
                                                <asp:TextBox ID="txtMisc5" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Misc5").ToString)%>'></asp:TextBox>
                                             </ItemTemplate>   
                                        </asp:TemplateField>
                                 <%--  Added by Jyoti K on 12 Aug 2021 | End--%>
                                <%--Added by Jyotik |25 Aug 2021 for JIRA: UCP_InternalUCP-225 |start--%>
                                 <asp:TemplateField HeaderText="WB_Code" Visible="true">

                                                <ItemTemplate>
                                                    <asp:Label ID="lblWBCode" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WB_Code").ToString)%>' />
                                                </ItemTemplate>
<%--                                                <EditItemTemplate>
                                                    <asp:TextBox ID="txtCode" runat="server" CssClass="txt"></asp:TextBox>
                                                </EditItemTemplate>--%>
                                            </asp:TemplateField>
                                <%--Added by Jyotik |25 Aug 2021 for JIRA: UCP_InternalUCP-225 |End--%>


                            </Columns>
                        </asp:GridView>
                    
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>

    </table>

    <asp:UpdatePanel ID="UpdatePanel2" runat="server" class="PanelPad">
        <ContentTemplate>
            <asp:Panel ID="grpButtonMap" runat="server" CssClass="groupBoxGrids2  invisible beutifyPopUp">
                <fieldset id="fieldsetbtnmap" class="MainFieldSet">
                    <table>
                        <tr>
                            <td>
                                <table class="InnerTable">
                                    <tr>
                                        <td>
                                            <asp:DropDownList ID="ddlTab" runat="server" AutoPostBack="True" CssClass="ddl" Width="157px">
                                            </asp:DropDownList>
                                            <%--  <asp:TextBox ID="TextButton" runat="server" Text="" CssClass="txt txtGrpBox" Width ="290px"></asp:TextBox>--%>
                                        </td>
                                        <td>
                                            <asp:Label ID="lblDisable" runat="server" AutoPostBack="True" CssClass="lbl" Text="*Selected buttons will be disabled">
                                            </asp:Label>
                                            <%--  <asp:TextBox ID="TextButton" runat="server" Text="" CssClass="txt txtGrpBox" Width ="290px"></asp:TextBox>--%>
                                        </td>
                                        <td>
                                            <asp:Button ID="btnMapSave" runat="server" Text="Save" CssClass="btn btnGroupbox" />
                                        </td>

                                        <td>
                                            <asp:Button ID="btnMapClose" runat="server" Text="X" CssClass="btn btnClose" align="Right" />
                                        </td>
                                        <%--                                   
     <t
                                            <asp:Button ID="btnMapClose" runat="server" Text="X" BackColor="Red" ForeColor="White" />
                                        </td>--%>
                                        <td>
                                            <asp:Button ID="dgvBtnMap" runat="server" Text="" CssClass="btn invisible" />
                                        </td>

                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div class="GridContainerTab">
                                    <%-- <asp:GridView ID="dgvTabButtonMap" runat="server" AllowSorting="True"
                                        AutoGenerateColumns="false" BorderStyle="None" BorderWidth="0px" CellPadding="3"
                                        CssClass="Grid" Height="300px" Width="350px">
                                        <HeaderStyle CssClass="GridHeader" />--%>
                                    <asp:GridView ID="dgvTabButtonMap" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                                        BorderStyle="Solid" BorderWidth="1px" CellPadding="3" CssClass="Grid Gridview" ShowHeaderWhenEmpty="true">
                                        <SelectedRowStyle CssClass="GridItemSelect" />
                                        <RowStyle CssClass="GridItem" />
                                        <HeaderStyle CssClass="GridHeader" />
                                        <FooterStyle CssClass="GridFooter" />

                                        <EmptyDataTemplate>
                                            <asp:Label ID="lblqueuedatagrid" runat="server" Text="No data found."></asp:Label>
                                        </EmptyDataTemplate>
                                        <Columns>
                                            <asp:TemplateField HeaderText="Selected" ControlStyle-Width="50">
                                                <ItemStyle Width="60px" HorizontalAlign="center" />
                                                <HeaderStyle Width="60px" />
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="chkbox_btnMap" runat="server" AutoPostBack="true"></asp:CheckBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--     <asp:TemplateField HeaderText="Selected" ControlStyle-Width="50">
                                                <HeaderStyle Width="60" />
                                                <ItemStyle Wrap="true" Width="60" horizontalalign="left" /> 
                                                <ItemTemplate>
                                                    <asp:Label ID="lblSelect" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Selected").ToString)%>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>--%>
                                            <asp:TemplateField HeaderText="Id" ControlStyle-Width="170">
                                                <HeaderStyle Width="180" />
                                                <ItemStyle Wrap="true" Width="180" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblTbId" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ID").ToString)%>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Name" ControlStyle-Width="140">
                                                <HeaderStyle Width="150" />
                                                <ItemStyle Wrap="true" Width="150" HorizontalAlign="left" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblName" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Name").ToString)%>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>

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



    
    <asp:UpdatePanel ID="UpdatePanel3" runat="server" class="PanelPad">
        <ContentTemplate>
    <asp:Panel ID="grpUsergroup" runat="server" CssClass="groupBoxGrids invisible">
        <div id="divUser_permissions" class="UserPermissions beutifyPopUp" runat="server">
        <fieldset class="MainFieldSet">
            <legend>
                <table>
                    <tr>
                        <td>
                            <table class="InnerTable">
                                <tr>
                                    <td>
                                        <asp:TextBox ID="txtUsername" CssClass="txt txtUsername" runat="server" Text=""></asp:TextBox>
                                    </td>
                                    <td>
                                        <asp:Button ID="btnLoadGrp" CssClass="btn btnGroupbox" runat="server" Text="Load" />
                                    </td>
                                    <td>
                                        <asp:Button ID="btnSaveGrp" CssClass="btn btnGroupbox" runat="server" Text="Save" />
                                    </td>
                                    <td>
                                        <asp:Button ID="btnCloseGrp" runat="server" Text="X" CssClass="btn btnClose" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="GridContainerTD">
                                <asp:GridView ID="dgvUser" runat="server" AllowSorting="True"
                                    AutoGenerateColumns="false" BorderStyle="Solid" BorderWidth="1px" CellPadding="3"
                                    CssClass="Grid" Width="361px">
                                    <HeaderStyle CssClass="GridHeader" />

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


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

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

                                        <%--    <asp:TemplateField HeaderText="User Name">
                                                <HeaderStyle></HeaderStyle>
                                                <ItemStyle></ItemStyle>
                                                <ItemTemplate>
                                                    <asp:Label ID="lblusr" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Name").ToString)%>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="User ID" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblusrID" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.U_ID").ToString)%>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>--%>
                                    </Columns>
                                </asp:GridView>
                            </div>
                        </td>
                    </tr>
                </table>
            </legend>
        </fieldset>
        </div>
        <div id="overlayDiv" class="overlaySearch"></div> 
        
    </asp:Panel>
            </ContentTemplate>
        </asp:UpdatePanel>

             <asp:HiddenField runat="server" ID="rowIndex" Value="" />
            </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

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

            if (document.getElementById('<%=rowIndex.ClientID%>').value >= 0) {
                $('#<%=dgvButton.ClientID%>').click();
            }          

        }
      
        function displayVisibleButtonMapBox(RowP) {

            $('#<%=dgvBtnMap.ClientID%>').click();
        }
        function displayColorDialogue(RowP) {

            $('#<%=rowIndex1.ClientID%>').val($(RowP).parent().parent().children().index($(RowP).parent()) - 1);

            if ($('#<%=rowIndex1.ClientID%>').val() > -1) {
                $('#<%=btnColor.ClientID%>').click();
            }
        }


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

        //Added by Nikhil Mali for Rows per page - 999 Validations : START
        function IsNumber(evt) {
            
            evt = (evt) ? evt : window.event;
            var char = (evt.which) ? evt.which : evt.keyCode;
            if (char > 31 && (char < 48 || char > 57)) {
                return false;
            }
            return true;
        }


        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
    </script>



</asp:Content>

<%--<table>
    <tr>
        <td>
            <fieldset>
                <legend></legend>

            </fieldset>
            <div>

            </div>
        </td>
    </tr>
    <tr>
        <td>
            
        </td>
    </tr>
</table>--%>
