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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <script src="../FinIQJS/external/jquery/jquery.js"></script>
    <script src="../FinIQJS/jquery-ui.js"></script>
    <script src="../FinIQJS/SortFilter_Grid.js"></script>
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    </asp:ScriptManagerProxy>
  <script type="text/javascript">
    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
    function EndRequestHandler(sender, args){
        if (args.get_error() != undefined){
            args.set_errorHandled(true);
        }
    }
  </script>
    <style type="text/css">
     
        .ddl {
            font-size: 11px !important;
            font-family: Verdana !important;
            font-weight: normal !important;
        }

        .labels {
            width: 60px;
        }

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

        .button {
            border-radius: 5px;
            height: 28px;
            margin-left: 6px;
        }

        .Grid th {
            border: solid 1px #dddddd;
            background-color: #ededed !important;
        }

        .Visible {
            display: block;
        }

        .invisible {
            display: none;
        }

        .groupBoxUserAccess {
            position: fixed;
            left: 1355px !important;
    top: 400px !important;
            height: auto;
            
            z-index: 1 !important;
             width: 340px !important;
        }

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

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


        /*.button 
        {
           Width:120px;
           font: normal 13px verdana !important; 
           height:30px !important;           
           border:solid 1px #CCCCCC !important;
           border-collapse:collapse !important;        
           color:#000000 !important;      
           background-color:#F2F2F3 !important;
           margin-left : 6px;
           margin-top : 6px;
           margin-bottom : 6px;
       }*/

        #Controls {
            float: left;
            margin-right: 6px;
        }
        /*#FilterContainer
        {
            border: 1px solid #DDDDDD;
            border-radius: 5px;
            
        }*/
        .btn {
            border-radius: 5px;
            height: 28px;
            margin-left: 8px;
        }

        /*.lbl
        {
            margin: 6px;
        }*/
        /*#ctl00_MainContent_grdworkflowtype th
        {
            padding: 6px;
        }*/
        .ActiveN {
            background-color: #F0F0F0;
        }



        fieldset {
            border: solid 1px #DDDDDD !important;
        }


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

           .UserGrpPopup {
          z-index: 10000000000 !important;
        }
        .overlaySearch {
        z-index:-1 !important;
        background-color: #000000 !important; /* Black background with opacity */
        display:block !important;
        }
         .beutifyPopUp {
            border-radius: 8px;
            box-shadow: 0 0 10px #000000;
        }


    </style>
    <link href="../App_Themes/Style1.css" rel="stylesheet" type="text/css" />
    <asp:UpdatePanel ID="UpdatePanelCP" runat="server" class="PanelPad">
        <ContentTemplate>

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

                <div>
                    <table>         
                        <tr>
                            <td>
                               <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>
                            <td style="height: 20px; padding-left: 12px;">
                                <asp:Label ID="lblError" CssClass="lbl" runat="server" Visible="True" ForeColor="Red"></asp:Label>
                                <asp:Label ID="lblMsg" CssClass="lbl" runat="server" Visible="True" ForeColor="Green"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </div>
                <div id="FilterContainer">
                    <div id="Controls">
                        <table>
                            <tr style="height: 50PX;">
                                <td>
                                    <asp:Label ID="lblworkflow" runat="server" CssClass="lbl" Text="WorkFlow Type" Width="100" Visible="True"></asp:Label>
                                </td>

                                <td style="width: 330PX">
                                    <asp:DropDownList ID="cboworkflowtype" runat="server" CssClass="ddl" AppendDataBoundItems="true"
                                        Width="300px" Visible="True" AutoPostBack="True" OnSelectedIndexChanged="cboworkflowtype_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </td>

                                <td style="vertical-align: central;">
                                    <asp:Label ID="lblDatabase" runat="server" CssClass="lbl" Text="Database" Width="80" Visible="False"></asp:Label>
                                </td>
                                <td style="width: 230PX">
                                    <asp:DropDownList ID="cmbDataBase" runat="server" CssClass="ddl" AppendDataBoundItems="true"
                                        Width="200px" Visible="False" AutoPostBack="True">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <asp:Label ID="lblColumnSource" runat="server" CssClass="lbl" Text="View" Width="40" Visible="False"></asp:Label>
                                </td>
                                <td style="width: 230PX">
                                    <asp:DropDownList ID="cmbColumnSource" runat="server" CssClass="ddl" AppendDataBoundItems="true"
                                        Width="200px" Visible="False" AutoPostBack="True">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <asp:Label ID="lblColumn" runat="server" CssClass="lbl" Text="Column" Width="80" Visible="False"></asp:Label>
                                </td>
                                <td style="width: 230PX">
                                    <asp:DropDownList ID="cmbColumn" runat="server" CssClass="ddl" AppendDataBoundItems="true"
                                        Width="200px" Visible="False" AutoPostBack="True">
                                    </asp:DropDownList>
                                </td>

                            </tr>
                        </table>
                        <table>
                            <tr style="height: 50PX;">
                                <td>

                                    <asp:Button ID="btnLoad" runat="server" Width="88px" Text="Load" CssClass="btn" />
                                </td>
                                <td>
                                    <asp:Button ID="btnAdd" runat="server" Width="88px" Text="Add" CssClass="btn" />
                                </td>
                                <td>
                                    <asp:Button ID="btnSave" runat="server" Width="88px" Text="Save" CssClass="btn" />
                                </td>
                                <td>
                                    <asp:Button ID="btnDelete" runat="server" Width="88px" Text="Delete" CssClass="btn" OnClientClick="return confirm('Are you sure to delete this record(s) ?');" />
                                </td>
                                <td>
                                    <asp:Button ID="btnCancel" runat="server" Width="88px" Text="Cancel" CssClass="btn" />
                                </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--%>
                            </tr>
                        </table>
                    </div>

                </div>


                <table id="tblGrid" style="padding-left: 8px; padding-top: 4px;">
                <tr>
                    <td>
                        <asp:GridView ID="grdworkflowtype" runat="server" PagerStyle-Height="32px"
                            AutoGenerateColumns="False" CssClass="Grid" BorderStyle="None" BorderWidth="0px" AllowSorting="True"
                            AllowPaging="True" ShowFooter="False" PageSize="999" ShowHeaderWhenEmpty="true">
                                <SelectedRowStyle CssClass="GridItemSelect" />
                                <%--<AlternatingRowStyle CssClass="GridItem" />--%>
                                <RowStyle CssClass="GridItem" />
                                <HeaderStyle CssClass="GridHeader" HorizontalAlign="Center" />
                                <FooterStyle CssClass="GridFooter" />
                                <PagerStyle CssClass="GridPager" />
                                <EditRowStyle CssClass="GridItemSelect" />
                                <EmptyDataTemplate>
                                    <asp:Label ID="lblEmpty" runat="server" Text="No data found.." />
                                </EmptyDataTemplate>
                                <PagerSettings Mode="NumericFirstLast"
                                    FirstPageText="First"
                                    LastPageText="Last"
                                    Position="Bottom" />
                                <Columns>

                                    <asp:TemplateField ControlStyle-Width="20px">
                                        <HeaderStyle Width="20px" />
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkSelect" OnCheckedChanged="chkSelect_CheckedChanged" AutoPostBack="true" runat="server"></asp:CheckBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                <asp:CommandField ButtonType="Link" ShowEditButton="true" EditText="Edit" CancelText="Cancel" ShowCancelButton="true" UpdateText="Update" Visible="false">
                                     <HeaderStyle Width="80px" HorizontalAlign="Center"/>
                                    <ItemStyle Width="80px" HorizontalAlign="Center" Wrap="false" />
                                    <HeaderStyle Width="80px" ForeColor="#0284e0" />
                                </asp:CommandField>

                                    <asp:TemplateField HeaderText="WBM ID" ControlStyle-Width="50px">
                                        <HeaderStyle Wrap="False" Width="50px"></HeaderStyle>
                                        <ItemStyle Wrap="false" Width="50px" HorizontalAlign="Right" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblId" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_ID").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Target Database" Visible="False">
                                        <HeaderStyle Wrap="False" Width="50px"></HeaderStyle>
                                        <ItemStyle Wrap="false" Width="50px" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblTargetDatabase" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.DNAME").ToString)%>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Target Table" Visible="False">
                                        <HeaderStyle Wrap="False" Width="50px"></HeaderStyle>
                                        <ItemStyle Wrap="false" Width="50px" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblTargetTable" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.TNAME").ToString)%>' >
                                            </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Target Column">
                                        <HeaderStyle Wrap="False" Width="250px"></HeaderStyle>
                                        <ItemStyle Wrap="false" Width="250px"  HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblTargetValue" Style="display: none;" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Target_Value").ToString)%>' Visible="false">
                                            </asp:Label>
                                             <asp:TextBox ID="txtTargetValue" Width="245px" runat="server" AutoPostBack="true" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Target_Value").ToString)%>'></asp:TextBox>
                                        </ItemTemplate>
                                       
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Blotter Header">
                                        <HeaderStyle Wrap="False" Width="250px"  HorizontalAlign="left"></HeaderStyle>
                                        <ItemStyle Wrap="false" Width="250px" />
                                      <ItemTemplate>
                                            <asp:Label ID="lblBlotterHeader" Style="display: none;" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Blotter_Header").ToString)%>' Visible="false">
                                            </asp:Label>
                                        </ItemTemplate>
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtBlotterHeader" Width="245px" runat="server" AutoPostBack="true" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Blotter_Header").ToString)%>'></asp:TextBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                <asp:TemplateField HeaderText="Format Type">
                                    <HeaderStyle Wrap="False" Width="120px" ></HeaderStyle>
                                    <ItemStyle Wrap="false" Width="120px" HorizontalAlign="left"/>
                                   <ItemStyle />
                                    <ItemTemplate>
                                        <asp:Label ID="lblFormatType" Style="display: none;" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Format_Type").ToString)%>' Visible="false">
                                        </asp:Label>
                                    
                                    
                                        <asp:DropDownList ID="ddlFormatType" Width="115px" runat="server"  Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Format_Type").ToString)%>' AutoPostBack="true" OnSelectedIndexChanged="RowSelected">
                                            <asp:ListItem Value="CURRENCY">CURRENCY</asp:ListItem>
                                            <asp:ListItem Value="DATE">DATE</asp:ListItem>
                                            <asp:ListItem Value="DATETIME">DATETIME</asp:ListItem>
                                            <asp:ListItem Value="NUMBER">NUMBER</asp:ListItem>
                                            <asp:ListItem Value="NUMERIC">NUMERIC</asp:ListItem>
                                            <asp:ListItem Value="NUMERIC1">NUMERIC1</asp:ListItem>
                                            <asp:ListItem Value="NUMERIC2">NUMERIC2</asp:ListItem>
                                            <asp:ListItem Value="NUMERIC3">NUMERIC3</asp:ListItem>
                                            <asp:ListItem Value="NUMERIC4">NUMERIC4</asp:ListItem>
                                            <asp:ListItem Value="NUMERIC5">NUMERIC5</asp:ListItem>
                                            <asp:ListItem Value="NUMERIC6">NUMERIC6</asp:ListItem> <%--Arati K|| 30-Aug-2019 ||New datatype added--%>
                                            <asp:ListItem Value="NUMERIC7">NUMERIC7</asp:ListItem>
                                            <asp:ListItem Value="NUMERIC8">NUMERIC8</asp:ListItem>
                                            <asp:ListItem Value="NUMERIC9">NUMERIC9</asp:ListItem>
                                            <asp:ListItem Value="TEXT">TEXT</asp:ListItem>
                                              <asp:ListItem Value="TEXTWITHCOLOUR">TEXTWITHCOLOUR</asp:ListItem>   <%--new datatype added--%>
                                        </asp:DropDownList>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Display Index">
                                        <HeaderStyle Wrap="False" Width="80px"></HeaderStyle>
                                        <ItemStyle Wrap="false" Width="80px" HorizontalAlign="Right" />
                                        <ItemTemplate>
                                           <asp:Label ID="lblDisplayIndex"  Style="display:none" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Sequence").ToString)%>'>
                                            </asp:Label>
                                       
                                        
                                            <asp:TextBox ID="txtDisplayIndex" Style="text-align: right" Width="75px" runat="server"  Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Sequence").ToString)%>' AutoPostBack="true"></asp:TextBox>
                                         </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Use as Filter Y/N">
                                        <HeaderStyle Wrap="False" Width="100px"></HeaderStyle>
                                        <ItemStyle Wrap="false" Width="100px" HorizontalAlign="Center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblUseasFilter" Style="display:none" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_UseForFilter").ToString)%>'>
                                            </asp:Label>
                                       
                                        
                                            <asp:DropDownList ID="ddlUseasFilter" Width="75px" runat="server" AutoPostBack="true" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_UseForFilter").ToString)%>' OnSelectedIndexChanged="RowSelected">
                                                <asp:ListItem Value="Y">Y</asp:ListItem>
                                                <asp:ListItem Value="N">N</asp:ListItem>
                                            </asp:DropDownList>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Column Width">
                                        <HeaderStyle Wrap="False" Width="80px"></HeaderStyle>
                                        <ItemStyle Wrap="false" Width="80px" HorizontalAlign="Right" />
                                       <ItemTemplate>
                                            <asp:Label ID="lblColumnWidth" Style="display:none;" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Size").ToString)%>'>
                                            </asp:Label>
                                        
                                       
                                            <asp:TextBox ID="txtColumnWidth" Style="text-align: right" Width="75px" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Size").ToString)%>' runat="server" AutoPostBack="true"></asp:TextBox>
                                            <%--<asp:RegularExpressionValidator ID="RegularExpressionValidator1" ControlToValidate="txtColumnWidth" runat="server" ErrorMessage="Only Numbers allowed" ValidationExpression="\d+"></asp:RegularExpressionValidator>--%>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Active Y/N">
                                        <HeaderStyle Wrap="False" Width="80px"></HeaderStyle>
                                        <ItemStyle Wrap="false" Width="80px" HorizontalAlign="Center" />
                                       <ItemTemplate> 
                                            <asp:Label ID="lblActiveYN"  Style="display:none;" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Active_YN").ToString)%>'>
                                            </asp:Label>
                                        
                                       
                                            <asp:DropDownList ID="ddlActiveYN" Width="75px" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Active_YN").ToString)%>' AutoPostBack="true" OnSelectedIndexChanged="RowSelected">
                                                <asp:ListItem Value="Y">Y</asp:ListItem>
                                                <asp:ListItem Value="N">N</asp:ListItem>
                                            </asp:DropDownList>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="User Group Access Permission" ControlStyle-Width="300" ItemStyle-Wrap="true">
                                        <HeaderStyle Width="200" />
                                        <ItemStyle Wrap="true" Width="300" HorizontalAlign="left" />
                                         <ItemTemplate>
                                           <%--<asp:Label ID="lblGroupPermission" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.GroupPermission").ToString)%>' />--%>
                                            <asp:Label ID="lblGroupPermission" Style="display:none !important;" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Blotter_Header").ToString)%>' />
                                        
                                       
                                            <asp:TextBox ID="txtGroupPermission" runat="server" CssClass="txt" ReadOnly="true" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Blotter_Header").ToString)%>'></asp:TextBox>
                                       </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Font Size" ControlStyle-Width="100" ItemStyle-Wrap="true">
                                        <HeaderStyle Width="100" />
                                        <ItemStyle Wrap="true" Width="100" HorizontalAlign="left" />
                                        <ItemTemplate>
                                            <%--<asp:Label ID="lblGroupPermission" CssClass="lbl" runat="servler" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.GroupPermission").ToString)%>' />--%>
                                           <asp:Label ID="lblCssStyle" Style="display:none;" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Workflow_Css_Style").ToString)%>' />
                                        
                                        
                                            <asp:TextBox ID="txtCssStyle" runat="server" CssClass="txt" onkeypress="return isNumberKey(event)"  Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Workflow_Css_Style").ToString)%>'></asp:TextBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Font Color" ControlStyle-Width="100" ItemStyle-Wrap="true">
                                        <HeaderStyle Width="100" />
                                        <ItemStyle Wrap="true" Width="100" HorizontalAlign="left" />
                                        <ItemTemplate>

                                        <asp:Label ID="lblforeColour"  Style="display:none;" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Misc2").ToString)%>' />

                                        
                                       
                                            <asp:TextBox ID="txtforeColour" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Misc2").ToString)%>'></asp:TextBox>
                                            <cc1:ColorPickerExtender ID="txtColor_ForeColorPickerExtender" TargetControlID="txtforeColour" Enabled="True" runat="server" OnClientColorSelectionChanged="Color_Changed"></cc1:ColorPickerExtender>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Masked While Export">
                                         <HeaderStyle Wrap="False" Width="80px"></HeaderStyle>
                                        <ItemStyle Wrap="false" Width="80px" HorizontalAlign="Center"/>
                                        <ItemTemplate>
                                            <asp:Label ID="lblMasked" runat="server"   Style="display: none;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Misc3").ToString)%>'></asp:Label>
                                        
                                        
                                            <asp:DropDownList ID="ddlMaskedYN" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Misc3").ToString)%>' Width="80px" AutoPostBack="true" OnSelectedIndexChanged="RowSelected">
                                                <asp:ListItem Value="" Text=""></asp:ListItem>
                                                <asp:ListItem Value="Y">Y</asp:ListItem>
                                                <asp:ListItem Value="N">N</asp:ListItem>
                                            </asp:DropDownList>

                                        </ItemTemplate>
                                    </asp:TemplateField>
									
									<asp:TemplateField HeaderText="Filter Value Source">
                                     <HeaderStyle Wrap="False" Width="120px"></HeaderStyle>
                                    <ItemStyle Wrap="false" Width="120px" />
                                   <ItemTemplate>
                                        <asp:Label ID="lblFilterValue" Style="display:none;" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Common_Data_field").ToString)%>'>
                                        </asp:Label>
                                                                     
                                  
                                      <asp:TextBox ID="txtFilterValue"  Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WBM_Common_Data_field").ToString)%>' Width="120px" runat="server" AutoPostBack="true"></asp:TextBox>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                </Columns>
                            </asp:GridView>
                        </td>
                        <td>
                            <asp:DropDownList ID="cbocommondata" runat="server" CssClass="ddl" AppendDataBoundItems="true"
                                Width="200px" Visible="False" AutoPostBack="True">
                            </asp:DropDownList>
                        </td>
                    </tr>

            </table>
            
            <asp:Panel ID="grpUsergroup" runat="server" CssClass="groupBoxUserAccess invisible" >
                <div id="divUsrAcc" runat="server" class="btnDetailsDiv beutifyPopUp">
                    <div>
                        <table>
                            <tr>
                                <td style="height: 20px; padding-left: 12px;">
                                    <asp:Label ID="LblColumnName" CssClass="lbl" runat="server" Visible="True" Text="Column:" ForeColor="Green"></asp:Label>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div id="divUserAccessControls" style="padding-bottom: 7px;padding-left: 5px;">
                        <asp:TextBox ID="txtUsername_UserDetails_popup" runat="server"></asp:TextBox>
                        <asp:Button ID="btnLoadGrp_UserDetails" runat="server" Text="Load" CssClass="btn btnGroupbox" />
                        <asp:Button ID="btnSaveGrp_UserDetails" runat="server" Text="Save" CssClass="btn btnGroupbox" />
                        <asp:Button ID="btnCloseGrp_UserDetails" runat="server" Text="X" CssClass="btn CloseButton" />
                    </div>
                    <div id="divUserAccessGrid" style="padding: 5px;">
                        <asp:GridView ID="dgv_C_User_Group" runat="server" AllowSorting="True" PageSize="10" PagerStyle-Height="32px" AllowPaging="true"
                            AutoGenerateColumns="False" CssClass="Grid" ShowHeaderWhenEmpty="True" EmptyDataText="No Records Found" Width="329px" EnableViewState="true">
                            <HeaderStyle CssClass="GridHeader" />
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkbox_UserQGrp" EnableViewState="true" runat="server" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="U_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.CUG_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 id="overlayDiv" class="overlaySearch"></div> 
                </div>
            </asp:Panel>
           
            </fieldset>
             
        </ContentTemplate>
    </asp:UpdatePanel>


    <script type="text/javascript">

 

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

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

        function Color_Changed(sender) {
            
            sender.get_element().value = sender.get_selectedColor();

        }


        //Added by Nikhil Mali for Rows per page - 999 : 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 : END
       


       function draggable() {
            $(function () {
                
                //$("#<%=grpUsergroup.ClientID%>").draggable();
                $("#ctl00_MainContent_divUsrAcc").draggable();
           
        });
        }
        
            
        
       
    </script>

</asp:Content>
