<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="FinIQ_SpecialSpreads.aspx.vb" Inherits="FinIQWebApp.SpecialSpreads" MasterPageFile="~/FiniqAppMasterPage.Master" Title="Special Spreads" %>

<%@ Register Src="../FinIQ_User_Controls/DateControl.ascx" TagName="DateControl" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="~/FinIQ_User_Controls/FXD_ProductSearch/FXD_ProductSearch.ascx" TagPrefix="uc2" TagName="FXD_ProductSearch" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">

    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    </asp:ScriptManagerProxy>

    <link href="../FinIQJS/FreezeGrid.css" type="text/css" rel="stylesheet">
    <script src="../FinIQJS/FreezeGrid.js" type="text/javascript"></script>
    <style>
        p {
            color: #0368b6 !important
        }
        .gridCol {
            width: 104px;
            /*white-space:nowrap;*/
        }

        .gridColLarge {
            width: 120px;
        }

        .lowerDiv {
            margin-top: 20px;
        }

        .UpperDiv {
            margin-left: 10px;
        }

        .tdLabelLong {
            width: 110px;
        }

        .tdDropdowm {
            width: 186px;
        }

        .tdButton {
            width: 100px;
        }

       

        .tdLabel {
            width: 48px;
        }

        .btn {
            width: 80px;
        }

        .dispNone {
            display: none;
            overflow: hidden;
        }

        .tdLong {
            width: 140px;
        }


        .gridColNum {
            width: 74px;
        }

        .colSpread {
            width: 80px;
        }

        .alignRight {
            text-align: right;
        }
        .ui-menu-item-wrapper {
            white-space: nowrap !important;
        }
        .hiddencol {
            display: none;
        }

         .Grid table .cpCurrentDate {
             text-align:right !important;
         }
         .display_flex {
            display: flex;
            align-items: center;
         }
        .btn_padding {
            padding-right: 10px;
            padding-top: 5px;
        }
    </style>
    <script type="text/javascript">

        function allowNegativeDecimalNumber_NEW(element, e) {
          
            var charCode = (e.which) ? e.which : event.keyCode

            var decimal = element.value.split('.');
            var Negative = element.value.split('-');

           
    
            if (charCode == 8 || charCode == 46) {
                return true;

            }
            if (decimal.length > 2) {
                return false;
            }

            if (charCode > 31 && (charCode < 45 || charCode > 57)) {

                if(element.value.indexOf("-") == -1){
                
                  return true;
                    
                }

                else if (Number(element.value) > 0) {

                    return true;

                }
                else {
                    return false;

                }
                
            }
            return true;

        }

        function MultiplyByNegative(obj, event) {
      
            var CurrentVal = $(obj).val();

            if (CurrentVal > 0) {
                $(obj).val(Number(CurrentVal) * (-1));
                return true;
            } else {

                // do nothing;
                return true;
            }

          

        }


        var dialogConfirmed = false;
        function ViewDialogDuplicate(obj, title, dialogText) {
            if ($("#pageName").html() != null) {
            }
            if (!dialogConfirmed) {
                //$('html').append(String.Format("<div id='dialog' title='{0}'><p style='float:left;'><span class='ui-icon ui-icon-alert' style='float:left; margin:0 5px 20px 0;'></span>{1}</p></div>", title, dialogText));
               //// $('html').append(String.Format("<div id='dialog' title='{0}'><div class='infoConfirmationBox' style='float:left; height:22px !important; width:22px !important; margin: 13px 15px 20px 10px;'></div><p> " + dialogText + " </p></div>", title));
                $('html').append(String.Format("<div id='dialog' title='{0}'><p style=float:left;><span class='ui-icon ui-icon-alert' style='margin : 0px 5px 20px 0px; float:left;'></span> " + dialogText + " </p></div>", title));

                $('#dialog').dialog
                        ({
                            height: 180,
                            width: 350,
                            modal: true,
                            resizable: false,
                            draggable: true,
                            close: function (event, ui) { $('html').find('#dialog').remove(); },
                            buttons:
                            {
                                'Yes': function () {
                                    $("#ctl00_MainContent_btnConfirmation").click();
                                    $(this).dialog('close');
                                },
                                'No': function () {
                                    $(this).dialog('close');
                                    $('html').find("#dialog").remove();
                                    return false;
                                }
                            }
                        });
            }

            return dialogConfirmed;
            $(".ui-widget-overlay").height($("body").height());

        }
        //<Start>Added by nilesh s on 18-May-2020 RHBUPINT-1371
        //SpecialSpread : Able to enter two Decilamls in min max spread colums

        function AllowNumericWithdecimalNonNegative(e, obj) {
            var NumDot = [];
            var NumDot1 = [];
            var Num = [];
            var keycode;
            var parts;
            var parts1;
            if (window.event)
                keycode = window.event.keyCode;
            
            if (window.event.shiftKey) {
                return false;
            }
            if (keycode == 46 || keycode == 8 || keycode == 9 || (keycode >= 35 && keycode <= 40)) {
                return true;
            }
            if (keycode == 109 || keycode == 189) {
                return false;
            }
            if (keycode > 31 && (keycode < 48 || keycode > 57) && keycode != 46 && keycode != 8 && keycode != 190 && (keycode < 96 || keycode > 105) && keycode != 110 && keycode != 36 && keycode != 35) {
                return false;
            }
            if (keycode == 190 || keycode == 110) {
                parts = $(obj).val().trim();
                NumDot = parts.split('.');
                if (NumDot.length > 1) {
                    return false;
                }
                else {
                    return true;
                }
            }
            var element = document.getElementById($(obj).attr('id'));
            var startPosition = element.selectionStart;
            var endPosition = element.selectionEnd;
            if (startPosition == endPosition) {
                parts = $(obj).val().trim();
                if (parts.indexOf('.') != -1) {
                    Num = parts.split('.');
                    if (Num[0].length > 3 && startPosition <= 4) {
                        return false;
                    }
                    if (Num[1].length > 3 && startPosition >= 4) {
                        return false;
                    }
                }
                else {
                    if (parts.length > 3)
                        return false;
                }
            }
            return true;
        }
        //<End>Added by nilesh s on 18-May-2020 RHBUPINT-1371
        //SpecialSpread : Able to enter two Decilamls in min max spread colums

        //<Start>Added by nilesh s on 18-May-2020 ANZDCIUPCL-69 
        //SpecialSpread : "Spread p.a" field value signage in 4.7 is not correct like in v 3.5
        function AllowNumericWithdecimal(e, obj) {

            var NumDot = [];
            var NumDot1 = [];
            var Num = [];
            var keycode;
            var parts;
            var parts1;

            if (window.event)
                keycode = window.event.keyCode;
            

            if (window.event.shiftKey) {
                return false;
            }

            if (keycode == 46 || keycode == 8 || keycode == 9 || (keycode >= 35 && keycode <= 40)) {
                return true;
            }

            if (keycode > 31 && (keycode < 48 || keycode > 57) && keycode != 46 && keycode != 8 && keycode != 190 && (keycode < 96 || keycode > 105) && keycode != 110 && keycode != 36 && keycode != 35 && keycode != 109 && keycode != 189) {
                return false;
            }


            if (keycode == 190 || keycode == 110) {
                parts = $(obj).val().trim();
                NumDot = parts.split('.');
                if (NumDot.length > 1) {
                    return false;
                }
                else {
                    return true;
                }
            }

            if (keycode == 109 || keycode == 189) {
                parts1 = $(obj).val().trim();
                NumDot1 = parts1.split('-');
                if (NumDot1.length > 1) {
                    return false;
                }
                else {
                    return true;
                }
            }

            var element = document.getElementById($(obj).attr('id'));
            var startPosition = element.selectionStart;
            var endPosition = element.selectionEnd;

            if (startPosition == endPosition) {
                parts = $(obj).val().trim();

                if (parts.indexOf('.') != -1) {
                    Num = parts.split('.');
                    if (Num[0].length > 3 && startPosition <= 4) {
                        return false;
                    }
                    if (Num[1].length > 3 && startPosition >= 4) {
                        return false;
                    }
                }
                else {
                    if (parts.length > 3)
                        return false;
                }
            }

            return true;
        }

        //<End>Added by nilesh s on 18-May-2020 ANZDCIUPCL-69 

        //Added by BhagyashriB on 25-Jan-2021
        function AllowNumericOnly(evt) {
            var charCode = (evt.which) ? evt.which : evt.keyCode;
            if (charCode > 31 && (charCode < 48 || charCode > 57))
                return false;
            return true;
        }
        //End by BhagyashriB on 25-Jan-2021
        //Added by BhagyashriB on 27-Jan-2021
        document.onkeyup = function (e) {
            if (e.ctrlKey && e.key == "r") {
                document.getElementById('<%= btnLoad.ClientID %>').click();
            } else if (e.ctrlKey && e.shiftKey && e.key == "E") {
                document.getElementById('<%= btnExport.ClientID %>').click();
            } else if (e.ctrlKey && e.shiftKey && e.key == "A") {
                document.getElementById('<%= btnAdd.ClientID %>').click();
            }
        }
        </script>

    <asp:UpdatePanel ID="UpdatePanelCP" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional">
        <ContentTemplate>

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

            <table class="UpperDiv">
                <tr>
                    <td colspan="11">
                        <asp:Label runat="server" ID="lblerror" Text="" CssClass="lblError" Style="color: #FF4E4E !important"> </asp:Label>
                        <asp:Label runat="server" ID="lblInfo" Text="" CssClass="lblInfo" Style="color: #0368B6 !important"> </asp:Label>
                        <asp:Label ID="lblsuccess" runat="server" Text="" CssClass="lblsuccess" Style="color: #008000 !important"></asp:Label>
                    </td>
                </tr>

                <tr>
                    <td colspan="2" class="btn_padding">
                        <asp:Label ID="lblEntity" runat="server" Text="<%$ Resources:LocalizedText,Entity %>" CssClass="lbl" Style="padding-right: 10px;"></asp:Label>
                        <asp:DropDownList ID="ddlEntity" CssClass="ddl" runat="server" AutoPostBack="true" Width="161px">
                        </asp:DropDownList>
                    </td>

                    <td colspan="2" class="btn_padding">
                        <div class="display_flex">
                            <asp:Label ID="lblProduct" runat="server" Text="Product " CssClass="lbl" Style="padding-right: 10px;"></asp:Label>
                            <uc2:FXD_ProductSearch runat="server" ID="fxd_ProductSearch" EnableViewState="true" Visible="true" OnValueSelected="updateProductSearch" />
                            <%--<asp:DropDownList ID="ddlProduct" runat="server" AutoPostBack="true" Width="151px" CssClass="ddl">
                            </asp:DropDownList>--%>
                        </div>
                    </td>

                    <td class="btn_padding">
                        <asp:Label ID="lblRM" runat="server" Text="RM " CssClass="lbl"></asp:Label>
                    </td>

                    <td class="btn_padding">
                        <asp:DropDownList ID="ddlRM" runat="server" AutoPostBack="true" Width="162px" CssClass="ddl">
                        </asp:DropDownList>
                    </td>




                    <td class="btn_padding">
                        <asp:Label ID="lblRows" runat="server" CssClass="lbl">Record(s) Per Page</asp:Label>
                    </td>

                    <td class="btn_padding">
                        <asp:TextBox ID="TxRowsPerPage" runat="server" Style="text-align: center;" AutoPostBack="true" OnKeyPress="return AllowNumericOnly(event);" MaxLength="2"
                             onkeydown="TxRowsPerPage_TextChanged(event)" Width="30" CssClass="txt" OnTextChanged="TxRowsPerPage_TextChanged"></asp:TextBox>
                        <asp:Button ID="btnSetPageSize" runat="server" Style="display: none"></asp:Button>
                    </td>
                    <td class="btn_padding">
                       <span style="color: #FF0000">*</span>
                        <asp:Label runat="server" ID="lblHighPriority" Text="" CssClass="lbl">High Priority &nbsp; 999</asp:Label>
                    </td>
                </tr>

                <tr>



                    <td class="btn_padding">
                        <asp:Button ID="btnAdd" runat="server" CssClass="btn" Text="Add New" Width="100px" ToolTip="Add New (ctrl + shift + a)"></asp:Button>
                    </td>

                    <td class="btn_padding">


                       <%-- <asp:Button ID="btnDelete" runat="server" CssClass="btn" Text="Delete" Width="98px"  OnClientClick="return DeleteSpecialSpreads();"></asp:Button>--%>
                         <asp:Button ID="btnDelete" runat="server" CssClass="btn" Text="Delete" Width="100px" ></asp:Button>
                    </td>
                    <td class="btn_padding">
                        <asp:Button ID="btnLoad" runat="server" CssClass="btn" Text="Load" Width="100px" ToolTip="Load (ctrl + r)"></asp:Button>
                    </td>
                    <td class="btn_padding">
                        <%--  <asp:Button ID="btnExport" runat="server" CssClass="btn btnCommon" Text="Export"></asp:Button>--%>
                        <asp:Button ID="btnExport" runat="server" CssClass="Export2Excel" Text="" ToolTip="Export Excel (ctrl + shift + e)"></asp:Button>
                    </td>
                    <td></td>
                    <td></td>

                    <td class="btn_padding">
                        <asp:Label ID="Label2" runat="server" CssClass="lbl">Total Record(s) : </asp:Label>
                    </td>

                    <td class="btn_padding">
                        <asp:Label ID="lblTotalRecords" runat="server" CssClass="lbl" Text=""></asp:Label>
                    </td>
                    <td class="btn_padding">
                           <span style="color: #FF0000">*</span>
                        <asp:Label runat="server" ID="Label1" Text="" class="lbl">Low Priority &nbsp; 1</asp:Label>
                   <%--     <span style="padding-left: 20px"></span>--%>
                      <%--  <span style="color: #FF0000">*</span>--%>
                      <%--  commented by snehal J on 25-Jul-2018 as told by sandip sir--%>
                     <%--   <asp:Label runat="server" ID="Label3" Text="" class="lbl">Please enter (-) ve spread value.</asp:Label>--%>
                    </td>
                    <td class="btn_padding">
                        <asp:Button ID="btnSave" runat="server" CssClass="btn dispNone" Text="Save" ></asp:Button>
                    </td>
                </tr>


              
            </table>
            <table>
                  <tr>
                    <td colspan="11">
                        <asp:GridView ID="gvSpreads" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                            BorderStyle="Solid" BorderWidth="1px" CellPadding="3" PagerStyle-Height="32px"
                            AllowPaging="true" CssClass="Grid" ShowHeaderWhenEmpty="true" RowHeadersWidthSizeMode="DisableResizing;" SelectedRowStyle-Wrap="true">

                            <SelectedRowStyle CssClass="GridItemSelect" />
                            <RowStyle CssClass="GridItem" />
                            <HeaderStyle CssClass="GridHeader" />
                            <FooterStyle CssClass="GridFooter" />
                            <PagerStyle CssClass="GridPager" />

                            <Columns>
                                <asp:TemplateField ControlStyle-Width="23">
                                    <HeaderStyle Width="40px" HorizontalAlign="Right" />
                                    <ItemStyle Width="40px" HorizontalAlign="Center" />
                                    <HeaderTemplate>
                                        <%--<asp:CheckBox ID="checkALL" runat="server" ItemStyle-Width="25px" OnCheckedChanged="checkAllCheckChanged" AutoPostBack="true"></asp:CheckBox>--%>
                                          <%------------------------- <Nilesh Shelar || commented on 23-Nov-2021 :1FinIQ4.7_Internal:INT1FIN47-213>--------------------%>
                                        <asp:CheckBox ID="checkALL" runat="server" ItemStyle-Width="25px" OnCheckedChanged="checkAllCheckChanged"  HorizontalAlign="Center"  AutoPostBack="true" ></asp:CheckBox>
                                         <%------------------------- </Nilesh Shelar || commented on 23-Nov-2021 :1FinIQ4.7_Internal:INT1FIN47-213>--------------------%>                                        
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <%--<asp:CheckBox ID="ChkRow" runat="server" ItemStyle-Width="25px" onclick="setRowColorOnCheckClick(this)"></asp:CheckBox>--%>
                                         <%------------------------- <Nilesh Shelar || commented on 23-Nov-2021 :1FinIQ4.7_Internal:INT1FIN47-213>--------------------%>
                                        <asp:CheckBox ID="ChkRow" runat="server" ItemStyle-Width="25px" OnCheckedChanged="ChkRecord_CheckedChanged"  AutoPostBack="true"  ></asp:CheckBox>
                                         <%------------------------- </Nilesh Shelar || commented on 23-Nov-2021 :1FinIQ4.7_Internal:INT1FIN47-213>--------------------%>  
                                    </ItemTemplate>
                                </asp:TemplateField>
                                 <%--column0--%>
                                
                                <%--<asp:CommandField ButtonType="Link" ShowEditButton="true" EditText="Edit" UpdateText="Save/Update" ItemStyle-Width="40px" />--%>

                                <asp:CommandField ButtonType="Link" ShowEditButton="true" EditText="Edit" UpdateText="Save">
                                    <HeaderStyle Width="70" />
                                    <ItemStyle Width="70" HorizontalAlign="Center"/>
                                </asp:CommandField>
                                <%--column1--%>

                                <%--<asp:CommandField ButtonType="Link" ShowEditButton="true" EditText="Edit" UpdateText="Save" />--%>

                                <asp:TemplateField HeaderText="SysPrty" ControlStyle-Width="30px">
                                    <HeaderStyle width="40px" />
                                    <ItemStyle width="40px" HorizontalAlign="right" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblSysPrty" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.SysPrty").ToString)%>' />
                                    </ItemTemplate>
                                    <%------------------------- <Pooja S || commented on 6-Mar-2017>--------------------%>
                                    <%--<EditItemTemplate>
                                            <asp:TextBox ID="txtSysPrty" runat="server"  CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.SysPrty").ToString)%>' ></asp:TextBox>
                                        </EditItemTemplate>--%>
                                    <%------------------------- </Pooja S || commented on 6-Mar-2017>--------------------%>
                                </asp:TemplateField>
                                <%--column2--%>

                                <asp:TemplateField HeaderText="Manual Priority" ControlStyle-Width="45">
                                    <HeaderStyle width="45" />
                                    <ItemStyle width="45" HorizontalAlign="right" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblManualPriority" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ManualPriority").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtManualPriority" runat="server" CssClass="txt alignRight" OnKeyPress="return AllowNumericOnly(event);"
                                            Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ManualPriority").ToString)%>' MaxLength="3"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                 <%--column3--%>

                                <asp:TemplateField HeaderText="SSEId" Visible="False">
                                    <HeaderStyle CssClass="gridCol" />
                                    <ItemStyle CssClass="gridCol" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblSSEId" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.SSEId").ToString)%>' />
                                    </ItemTemplate>
                                    <%-- <EditItemTemplate>
                                <%--<asp:TextBox ID="txtSSEId" runat="server"  CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.SSEId").ToString)%>' ></asp:TextBox>
                                <asp:DropDownList ID="ddlSSEId" CssClass="ddl" runat="server"></asp:DropDownList>
                            </EditItemTemplate>--%>
                                </asp:TemplateField>
                                  <%--column4--%>

                                <asp:TemplateField HeaderText="Currency"  ControlStyle-Width="90">
                                    <HeaderStyle Width="90" />
                                    <ItemStyle Width="90" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblCurrency" CssClass="lbl" runat="server" Wrap="true" Width="100%" Style="word-wrap: break-word; word-break: break-all; display: inline;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Currency").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlCurrency" runat="server" CssClass="ddl" Width="90px"></asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>

                                <%--column5--%>
                                <asp:TemplateField HeaderText="Product" ControlStyle-Width="260">
                                    <HeaderStyle width="260px" wrap="true"  />
                                    <ItemStyle  HorizontalAlign="left" Wrap="false"  />
                                    <ItemTemplate>
                                        <asp:Label ID="lblProduct" CssClass="lbl" runat="server" Wrap="true" Width="100%" Style="word-wrap: break-word; word-break: break-all; display: inline;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Product").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <%--<asp:TextBox ID="txtProduct1" runat="server"  CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Product").ToString)%>' ></asp:TextBox>--%>
                                        <asp:DropDownList ID="ddlProduct1" CssClass="ddl" runat="server" width="260px"></asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>

                                <%--column6--%>

                             
                                 <%----------------------- Added new column by snehal as told by Sandip sir     --------------------------------------------%>
                                  <asp:TemplateField HeaderText="Direction" ControlStyle-Width="90">
                                    <HeaderStyle width=""  />
                                    <ItemStyle width="90px"  HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblDirection" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Direction").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlCustomerDirection" CssClass="EditItemddl ddl" width="90px" runat="server">
                                           <asp:ListItem Value="Default">Default</asp:ListItem>                                                                   
                                          <asp:ListItem Value="Buy">Buy</asp:ListItem>
                                            <asp:ListItem Value="Sell">Sell</asp:ListItem>
                                          </asp:DropDownList>
                                           </EditItemTemplate>
                                </asp:TemplateField>

                                <%----------------------- End--------------------------------------------%>

                                <%--column7--%>
                                <asp:TemplateField HeaderText="Minimum Spread Amount" Visible="true">
                                    <HeaderStyle CssClass="gridColNum" />
                                    <ItemStyle CssClass="gridColNum" HorizontalAlign="right" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblMinimumSpreadAmount" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MinimumSpreadAmount").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtMinimumSpreadAmount" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MinimumSpreadAmount").ToString)%>'></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>

                                <%--column8--%>
                                <asp:TemplateField HeaderText="Maximum Spread Amount" Visible="true">
                                    <HeaderStyle CssClass="gridColNum" />
                                    <ItemStyle CssClass="gridColNum" HorizontalAlign="right" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblMaximumSpreadAmount" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MaximumSpreadAmount").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtMaximumSpreadAmount" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MaximumSpreadAmount").ToString)%>'></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--column9--%>
                                <%-- <asp:TemplateField HeaderText="Minimum Spread Basis Points" ControlStyle-Width="40">--%>
                                <asp:TemplateField HeaderText="Minimum Spread (%)" ControlStyle-Width="40">
                                    <HeaderStyle />
                                    <ItemStyle Width="80px" HorizontalAlign="right" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblMinimumSpreadPercentage" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MinimumSpreadPercentage").ToString)%>' />
                                    </ItemTemplate>
                                     <%--  <Start>Added by nilesh s on 23-Sep-2020 ANZDCIUPCL-69  SpecialSpread : "Spread p.a" field value signage in 4.7 is not correct like in v 3.5
                                    --%>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtMinimumSpreadPercentage" Width="80px" runat="server" CssClass="txt alignRight" OnKeyDown=" return AllowNumericWithdecimal(event,this);"
                                            Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MinimumSpreadPercentage").ToString)%>'></asp:TextBox>
                                        <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" FilterType="Numbers,Custom" ValidChars=".-" TargetControlID="txtMinimumSpreadPercentage" />
                                    </EditItemTemplate>
                                     <%--  <Start>Added by nilesh s on 23-Sep-2020 ANZDCIUPCL-69  SpecialSpread : "Spread p.a" field value signage in 4.7 is not correct like in v 3.5
                                    --%>
                                </asp:TemplateField>

                                <%--  <asp:TemplateField HeaderText="Maximum Spread Basis Points" ControlStyle-Width="40">--%>
                                <%--column10--%>
                                <asp:TemplateField HeaderText="Maximum Spread (%)" ControlStyle-Width="40">
                                    <HeaderStyle Width="80px" />
                                    <ItemStyle Width="80px" HorizontalAlign="right" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblMaximumSpreadPercentage" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MaximumSpreadPercentage").ToString)%>' />
                                    </ItemTemplate>
                                     <%--  <Start>Added by nilesh s on 23-Sep-2020 ANZDCIUPCL-69  SpecialSpread : "Spread p.a" field value signage in 4.7 is not correct like in v 3.5
                                    --%>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtMaximumSpreadPercentage" runat="server" Width="70px" CssClass="txt alignRight" OnKeyDown=" return AllowNumericWithdecimal(event,this);"
                                            Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MaximumSpreadPercentage").ToString)%>'></asp:TextBox>
                                        <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" FilterType="Numbers,Custom" ValidChars=".-" TargetControlID="txtMaximumSpreadPercentage" />
                                    </EditItemTemplate>
                                     <%--  <End>Added by nilesh s on 23-Sep-2020 ANZDCIUPCL-69  SpecialSpread : "Spread p.a" field value signage in 4.7 is not correct like in v 3.5
                                    --%>
                                </asp:TemplateField>

                                <%--column11--%>
                                <asp:TemplateField HeaderText="Bid Spread" ControlStyle-Width="40px" Visible="true">
                                    <HeaderStyle Width="" />
                                    <ItemStyle Width="100px" HorizontalAlign="right" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblBidSpread" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BidSpread").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtBidSpread" runat="server" CssClass="txt alignRight" Width="100px" BorderStyle="None" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BidSpread").ToString)%>'></asp:TextBox>
                                        <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" FilterType="Numbers,Custom" ValidChars=".-" TargetControlID="txtBidSpread" />
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--column12--%>
                                <asp:TemplateField HeaderText="Ask Spread" ControlStyle-Width="40px" Visible="true">
                                    <HeaderStyle Width="" />
                                    <ItemStyle Width="100px" HorizontalAlign="right" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblAskSpread" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AskSpread").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtAskSpread" runat="server" CssClass="txt alignRight" Width="100px" BorderStyle="None" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AskSpread").ToString)%>'></asp:TextBox>
                                        <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" FilterType="Numbers,Custom" ValidChars=".-" TargetControlID="txtAskSpread" />
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--column13--%>


                                <%--Pooja S || Order changed || 24-Jul-2017 || Asked by - Akhtar--%>
                                <%--   <asp:TemplateField HeaderText="Maximum Deal Notional" ControlStyle-Width="110">
                                    <HeaderStyle CssClass="gridColLarge" />
                                    <ItemStyle CssClass="gridColLarge" HorizontalAlign="right" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblMaximumDealNotional" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MaximumDealNotional").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtMaximumDealNotional" runat="server" CssClass="txt"  onchange="$(this).val(FormatNotional($(this).val()))"
                                            Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MaximumDealNotional").ToString)%>'></asp:TextBox>
                                        <%--onKeyPress="return numericwithdecimal(this,event)"-
                                    </EditItemTemplate>
                                </asp:TemplateField>--%>

                               
                                <%------------------------Pooja S || Changed Order || 6th-March-2017--------------------------------------------%>
                                <asp:TemplateField HeaderText="CKey" ControlStyle-Width="80">
                                    <HeaderStyle Width="80px" wrap="true" />
                                    <ItemStyle Width="80px" HorizontalAlign="left" Wrap="false" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblCKey" CssClass="lbl" runat="server" Wrap="true" Width="100%" Style="word-wrap: break-word; word-break: break-all; display: inline;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.CKey").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlCKey" runat="server" Width="80px" CssClass="ddl" AutoPostBack="True" OnSelectedIndexChanged="ddlCKey_changed"></asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%------------------------End Pooja S || Changed Order || 6th-March-2017--------------------------------------------%>

                                <%--column14--%>
                                <%------------------------Pooja S || 6th-March-2017--------------------------------------------%>
                                <asp:TemplateField HeaderText="RateSet" Visible="false">
                                    <HeaderStyle CssClass="gridCol" />
                                    <ItemStyle CssClass="gridCol" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblRateSet" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RateSet").ToString)%>' />
                                    </ItemTemplate>
                                    <%-- <EditItemTemplate>
                                <asp:TextBox ID="txtRateSet" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RateSet").ToString)%>'></asp:TextBox>
                            </EditItemTemplate>--%>
                                </asp:TemplateField>
                                <%--column15--%>
                                <asp:TemplateField HeaderText="Customer Code" ControlStyle-Width="150">
                                    <HeaderStyle width="150px" wrap="true" />
                                    <ItemStyle width="150px"  HorizontalAlign="left" Wrap="false" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblCustomerCode" CssClass="lbl" runat="server" Wrap="true" Width="100%" Style="word-wrap: break-word; word-break: break-all; display: inline;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.CustomerCode").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlCustomerCode" CssClass="ddl" runat="server" Width="150px">
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>

                                <%--column16--%>
                                <asp:TemplateField HeaderText="RM Key" ControlStyle-Width="100">
                                    <HeaderStyle width="100px" wrap="true"/>
                                    <ItemStyle width="100px" HorizontalAlign="left" Wrap="false"/>
                                    <ItemTemplate>
                                        <asp:Label ID="lblRMKey" CssClass="lbl" runat="server" Wrap="true" Width="100%" Style="word-wrap: break-word; word-break: break-all; display: inline;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.DKey").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlDKey" runat="server" CssClass="ddl" Width="110px" AutoPostBack="True" OnSelectedIndexChanged="ddlDKey_changed"></asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>

                                <%--column17--%>
                                <asp:TemplateField HeaderText="RM Code" ControlStyle-Width="100">
                                    <HeaderStyle width="100px" wrap="true" />
                                    <ItemStyle width="100px" HorizontalAlign="left" Wrap="false" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblRMCode" CssClass="lbl" runat="server" Wrap="true" Width="100%" Style="word-wrap: break-word; word-break: break-all; display: inline;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.DealerCode").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlDealerCode" CssClass="ddl" Width="100px" runat="server">
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>

                                <%--column18--%>
                                <asp:TemplateField HeaderText="BKey" ControlStyle-Width="100">
                                    <HeaderStyle width="100px" wrap="true"/>
                                    <ItemStyle width="100px" HorizontalAlign="left" Wrap="false"/>
                                    <ItemTemplate>
                                        <asp:Label ID="lblBKey" CssClass="lbl" runat="server" Wrap="true" Width="100%" Style="word-wrap: break-word; word-break: break-all; display: inline;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BKey").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlBKey" runat="server" CssClass="ddl" AutoPostBack="True" OnSelectedIndexChanged="ddlBKey_changed"></asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>

                                <%--column19--%>
                                <asp:TemplateField HeaderText="BookCode" ControlStyle-Width="100">
                                    <HeaderStyle width="100px" wrap="true"/>
                                    <ItemStyle width="100px" HorizontalAlign="left" Wrap="false"/>
                                    <ItemTemplate>
                                        <asp:Label ID="lblBookCode" CssClass="lbl" runat="server" Wrap="true" Width="100%" Style="word-wrap: break-word; word-break: break-all; display: inline;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BookCode").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlBookCode" CssClass="ddl" Width="100px" runat="server"></asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                
                                <%--column20--%>
                                <asp:TemplateField HeaderText="Location Name" ControlStyle-Width="100">
                                    <HeaderStyle Width="100px" wrap="true"/>
                                    <ItemStyle Width="100px" HorizontalAlign="left" Wrap="false"/>
                                    <ItemTemplate>
                                        <asp:Label ID="lblLocationName" CssClass="lbl" runat="server" Wrap="true" Width="100%" Style="word-wrap: break-word; word-break: break-all; display: inline;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.LocationName").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlLocationName" CssClass="ddl" runat="server" Width="100"></asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                
                                <%--column21--%>
                                <asp:TemplateField HeaderText="Special Spread" ControlStyle-Width="110">
                                    <HeaderStyle Width="110px" wrap="true"/>
                                    <ItemStyle Width="110px" HorizontalAlign="right" Wrap="false"/>
                                    <ItemTemplate>
                                        <asp:Label ID="lblSpecialSpread" CssClass="lbl" runat="server" Wrap="true" Width="100%" Style="word-wrap: break-word; word-break: break-all; display: inline;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.SpecialSpread").ToString)%>' />
                                    </ItemTemplate>

                                  <%--  <Start>Added by nilesh s on 18-Sep-2020 ANZDCIUPCL-69  SpecialSpread : "Spread p.a" field value signage in 4.7 is not correct like in v 3.5
                                    --%>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtSpecialSpread" runat="server" CssClass="txt alignRight" OnKeyDown=" return AllowNumericWithdecimal(event,this);"
                                            Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.SpecialSpread").ToString)%>'></asp:TextBox>
                                         <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender5" runat="server" FilterType="Numbers,Custom" ValidChars=".-" TargetControlID="txtAskSpread" />
                                    </EditItemTemplate>
                                    <%--  <End>Added by nilesh s on 18-Sep-2020 ANZDCIUPCL-69  SpecialSpread : "Spread p.a" field value signage in 4.7 is not correct like in v 3.5
                                    --%>
                                </asp:TemplateField>

                                <%--column22--%>
                                <%------------------------Pooja S || 6th-March-2017--------------------------------------------%>
                                <asp:TemplateField HeaderText="Bid Type" Visible="false">
                                    <HeaderStyle CssClass="gridCol" />
                                    <ItemStyle CssClass="gridCol" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblBidType" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BidType").ToString)%>' />
                                    </ItemTemplate>
                                    <%-- <EditItemTemplate>
                                <asp:TextBox ID="txtBidType" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BidType").ToString)%>'></asp:TextBox>
                            </EditItemTemplate>--%>
                                </asp:TemplateField>

                                <%--column23--%>
                                <asp:TemplateField HeaderText="Bid Value" Visible="false">
                                    <HeaderStyle CssClass="gridCol" />
                                    <ItemStyle CssClass="gridCol" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblBidValue" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BidValue").ToString)%>' />
                                    </ItemTemplate>
                                    <%-- <EditItemTemplate>
                                <asp:TextBox ID="txtBidValue" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BidValue").ToString)%>'></asp:TextBox>
                            </EditItemTemplate>--%>
                                </asp:TemplateField>
                                <%--column24--%>
                                <asp:TemplateField HeaderText="Offer Type" Visible="false">
                                    <HeaderStyle CssClass="gridCol" />
                                    <ItemStyle CssClass="gridCol" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblOfferType" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.OfferType").ToString)%>' />
                                    </ItemTemplate>
                                    <%-- <EditItemTemplate>
                                <asp:TextBox ID="txtOfferType" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.OfferType").ToString)%>'></asp:TextBox>
                            </EditItemTemplate>--%>
                                </asp:TemplateField>
                                <%--column25--%>
                                <asp:TemplateField HeaderText="Offer Value" Visible="false">
                                    <HeaderStyle CssClass="gridCol" />
                                    <ItemStyle CssClass="gridCol" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblOfferValue" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.OfferValue").ToString)%>' />
                                    </ItemTemplate>
                                    <%--<EditItemTemplate>
                                <asp:TextBox ID="txtOfferValue" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.OfferValue").ToString)%>'></asp:TextBox>
                            </EditItemTemplate>--%>
                                </asp:TemplateField>
                                <%------------------------End Pooja S || 6th-March-2017--------------------------------------------%>
                                <%--column26--%>
                                <asp:TemplateField HeaderText="Currency Key" ControlStyle-Width="100">
                                    <HeaderStyle width="100px" wrap="true" />
                                    <ItemStyle width="100px"  HorizontalAlign="left" Wrap="false"/>
                                    <ItemTemplate>
                                        <asp:Label ID="lblCurrencyKey" CssClass="lbl" runat="server" Wrap="true" Width="100%" Style="word-wrap: break-word; word-break: break-all; display: inline;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.CurrencyKey").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlCurrencyKey" runat="server"  Width="100" CssClass="ddl"></asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--column27--%>
                                <asp:TemplateField HeaderText="Currency Pair" ControlStyle-Width="100">
                                    <HeaderStyle width="100px" wrap="true" />
                                    <ItemStyle width="100px" HorizontalAlign="center" Wrap="false" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblCurrencyPair" CssClass="lbl" runat="server" Wrap="true" Width="100%" Style="word-wrap: break-word; word-break: break-all; display: inline;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.CurrencyPair").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlCurrencyPair" CssClass="ddl"  Width="110" runat="server"></asp:DropDownList>
                                     </EditItemTemplate>
                                </asp:TemplateField>
                                <%--column28--%>
                                <%------------------------ Pooja S || 6th-March-2017--------------------------------------------%>
                                <asp:TemplateField HeaderText="Notional Band" ControlStyle-Width="150px">
                                    <HeaderStyle Width="150px" wrap="true" />
                                    <ItemStyle Width="150px" HorizontalAlign="left" Wrap="false" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblNotionalBand" CssClass="lbl" runat="server" Wrap="true" Width="100%" Style="word-wrap: break-word; word-break: break-all; display: inline;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Notional_Band").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlNotional_Band" CssClass="ddl" Width="150" runat="server"></asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--column29--%>
                                <asp:TemplateField HeaderText="Delta Band" ControlStyle-Width="120px">
                                    <HeaderStyle  width="120px" wrap="true"/>
                                    <ItemStyle width="120px"  HorizontalAlign="left" Wrap="false"/>
                                    <ItemTemplate>
                                        <asp:Label ID="lblDeltaBand" CssClass="lbl" runat="server" Wrap="true" Width="100%" Style="word-wrap: break-word; word-break: break-all; display: inline;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Delta_Band").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlDelta_Band" CssClass="ddl" Width="120" runat="server"></asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--column30--%>
                                <asp:TemplateField HeaderText="Maturity Band" ControlStyle-Width="120px">
                                    <HeaderStyle width="120px" wrap="true"/>
                                    <ItemStyle width="120px" HorizontalAlign="left" Wrap="false"/>
                                    <ItemTemplate>
                                        <asp:Label ID="lblMaturityBand" CssClass="lbl" runat="server" Wrap="true" Width="100%" Style="word-wrap: break-word; word-break: break-all; display: inline;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Maturity_Band").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlMaturity_Band" CssClass="ddl" Width="120" runat="server">
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--column31--%>
                                <asp:TemplateField HeaderText="Time Band" Visible="false">
                                    <HeaderStyle CssClass="gridCol" />
                                    <ItemStyle CssClass="gridCol" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblTimeBand" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.TimeBand").ToString)%>' />
                                    </ItemTemplate>
                                    <%--<EditItemTemplate>
                                <asp:TextBox ID="txtTimeBand" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.TimeBand").ToString)%>'></asp:TextBox>
                            </EditItemTemplate>--%>
                                </asp:TemplateField>
                                <%--column32--%>
                                <asp:TemplateField HeaderText="Rule/Message" ControlStyle-Width="200">
                                    <HeaderStyle width="220px" />
                                    <ItemStyle  HorizontalAlign="left" width="220px"/>
                                    <ItemTemplate>
                                        <asp:Label ID="lblRuleMessage" CssClass="lbl" runat="server" Wrap="true" Width="100%" Style="word-wrap: break-word; word-break: break-all; display: inline;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RuleMessage").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtRuleMessage" runat="server" CssClass="txt" TextMode="MultiLine" Wrap="true"  MaxLength="49" Style="word-wrap: break-word; word-break: break-all;"  onkeypress="return CheckLength(this);"  Text='<%# (DataBinder.Eval(Container, "DataItem.RuleMessage").ToString)%>'></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%------------------------End Pooja S || 6th-March-2017--------------------------------------------%>
                                <%--column33--%>
                                <asp:TemplateField HeaderText="Accredited Investor YN" ControlStyle-Width="70">
                                    <HeaderStyle width="70px" />
                                    <ItemStyle width="70px" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblAccreditedInvestorYN" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AccreditedInvestorYN").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <%-----------------------Pooja S || Changed to dropdown || 7th-March-2017----------------------------%>
                                        <asp:DropDownList ID="ddlAccreditedYN" CssClass="ddl" width="70px" runat="server">
                                        </asp:DropDownList>
                                        <%--<asp:TextBox ID="txtAccreditedInvestorYN" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AccreditedInvestorYN").ToString)%>'></asp:TextBox>--%>
                                        <%-----------------------End Pooja S || Changed to dropdown || 7th-March-2017----------------------------%>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                 <%--column34--%>
                                <asp:TemplateField HeaderText="Customer Type" ControlStyle-Width="85">
                                    <HeaderStyle CssClass="gridCol" />
                                    <ItemStyle CssClass="gridCol" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblCustomerType" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.CustomerType").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <%-----------------------Pooja S || Changed to dropdown || 8th-March-2017----------------------------%>
                                        <asp:DropDownList ID="ddlCustomerType" CssClass="ddl" width="100px" runat="server">
                                        </asp:DropDownList>
                                        <%--<asp:TextBox ID="txtCustomerType" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.CustomerType").ToString)%>'></asp:TextBox>--%>
                                        <%-----------------------Pooja S || Changed to dropdown || 8th-March-2017----------------------------%>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                 <%--column35--%>
                                <asp:TemplateField HeaderText="Start Date" HeaderStyle-Wrap="true">
                                    <HeaderStyle Width="200px" />
                                    <ItemStyle HorizontalAlign="Center" Width="200px" Wrap="false" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblStartDate" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.StartDate").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <%--<asp:TextBox ID="txtStartDate" runat="server"  CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.StartDate").ToString)%>' ></asp:TextBox>--%>
                                        <uc1:DateControl ID="dtpStartDate" runat="server" CalenderCss="btn1" TextBoxCss="txt" DoPostBack="true" Value='<%# DataBinder.Eval(Container, "DataItem.StartDate")%>' />
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                 <%--column36--%>
                                <asp:TemplateField HeaderText="End Date" HeaderStyle-Wrap="true">
                                    <HeaderStyle Width="200px" />
                                    <ItemStyle HorizontalAlign="Center" Width="200px" Wrap="false" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblEndDate" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.EndDate").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate  >
                                        <%--<asp:TextBox ID="txtEndDate" runat="server"  CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.EndDate").ToString)%>' ></asp:TextBox>--%>
                                        <uc1:DateControl ID="dtpEndDate" runat="server" CalenderCss="btn1" TextBoxCss="txt" />
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                 <%--column37--%>
                                <asp:TemplateField HeaderText="Disable" Visible="false">
                                    <HeaderStyle CssClass="gridCol" />
                                    <ItemStyle CssClass="gridCol" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblDisable" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Disable").ToString)%>' />
                                    </ItemTemplate>
                                    <%--<EditItemTemplate>
                                <asp:TextBox ID="txtDisable" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Disable").ToString)%>'></asp:TextBox>
                            </EditItemTemplate>--%>
                                </asp:TemplateField>
                                 <%--column38--%>
                                <asp:TemplateField HeaderText="Def" Visible="false">
                                    <HeaderStyle CssClass="gridCol" />
                                    <ItemStyle CssClass="gridCol" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblDef" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Def").ToString)%>' />
                                    </ItemTemplate>
                                    <%--<EditItemTemplate>
                                <asp:TextBox ID="txtDef" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Def").ToString)%>'></asp:TextBox>
                            </EditItemTemplate>--%>
                                </asp:TemplateField>
                                 <%--column39--%>
                                <asp:TemplateField HeaderText="Customer ID Type" ControlStyle-Width="100">
                                    <HeaderStyle width="100px" wrap="true" />
                                    <ItemStyle width="100px" HorizontalAlign="left" Wrap="false"/>
                                    <ItemTemplate>
                                        <asp:Label ID="lblCustomerIDType" CssClass="lbl" runat="server" Wrap="true" Width="100%" Style="word-wrap: break-word; word-break: break-all; display: inline;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.CustomerIDType").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <%-----------------------Pooja S || Changed to dropdown || 7th-March-2017----------------------------%>
                                        <asp:DropDownList ID="ddlCustomerIDType" CssClass="ddl" width="100px" runat="server">
                                        </asp:DropDownList>
                                        <%--<asp:TextBox ID="txtCustomerIDType" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.CustomerIDType").ToString)%>'></asp:TextBox>--%>
                                        <%-----------------------End Pooja S || Changed to dropdown || 7th-March-2017----------------------------%>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                 <%--column40--%>
                                <asp:TemplateField HeaderText="Dealer Group" ControlStyle-Width="150px">
                                    <HeaderStyle width="150px" wrap="true" />
                                    <ItemStyle width="150px" HorizontalAlign="left" Wrap="false" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblDealerGroup" CssClass="lbl" runat="server" Wrap="true" Width="100%" Style="word-wrap: break-word; word-break: break-all; display: inline;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.DealerGroup").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <%-----------------------Pooja S || Changed to dropdown || 7th-March-2017----------------------------%>
                                        <asp:DropDownList ID="ddlDealerGroup" CssClass="ddl" runat="server" Width="150px">
                                        </asp:DropDownList>
                                        <%--<asp:TextBox ID="txtDealerGroup" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.DealerGroup").ToString)%>'></asp:TextBox>--%>
                                        <%-----------------------End Pooja S || Changed to dropdown  ||  7th-March-2017----------------------------%>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                 <%--column41--%>
                                <asp:TemplateField HeaderText="Relationship Package Code" ControlStyle-Width="100">
                                    <HeaderStyle width="100px" wrap="true" />
                                    <ItemStyle width="100px" HorizontalAlign="left" Wrap="false" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblRelationshipPackageCode" CssClass="lbl" runat="server" Wrap="true" Width="100%" Style="word-wrap: break-word; word-break: break-all; display: inline;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RelationshipPackageCode").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <%-----------------------Pooja S || Changed to dropdown || 7th-March-2017----------------------------%>
                                        <asp:DropDownList ID="ddlRelationshipPackageCode" CssClass="ddl" Width="100px" runat="server">
                                        </asp:DropDownList>
                                        <%--<asp:TextBox ID="txtRelationshipPackageCode" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RelationshipPackageCode").ToString)%>'></asp:TextBox>--%>
                                        <%-----------------------End Pooja S || Changed to dropdown || 7th-March-2017----------------------------%>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--column42--%>
                                <%----------------------------------Pooja S || 6th-Mar-2017--------------------------------%>
                               <%-- <asp:TemplateField HeaderText="Minimum Spread Percentage" ControlStyle-Width="110">
                                    <HeaderStyle CssClass="gridColLarge" />
                                    <ItemStyle CssClass="gridColLarge" HorizontalAlign="right" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblMinimumSpreadPercentage" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MinimumSpreadPercentage").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtMinimumSpreadPercentage" runat="server" CssClass="txt" onKeyPress="return allowNegativeDecimalNumber_NEW(this,event);"
                                            Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MinimumSpreadPercentage").ToString)%>'></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Maximum Spread Percentage" ControlStyle-Width="110">
                                    <HeaderStyle CssClass="gridColLarge" />
                                    <ItemStyle CssClass="gridColLarge" HorizontalAlign="right" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblMaximumSpreadPercentage" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MaximumSpreadPercentage").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtMaximumSpreadPercentage" runat="server" CssClass="txt" onKeyPress="return allowNegativeDecimalNumber_NEW(this,event);"
                                            Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MaximumSpreadPercentage").ToString)%>'></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>--%>

                                <asp:TemplateField HeaderText="Min Deal Notional" Visible="false">
                                    <HeaderStyle CssClass="gridColLarge" />
                                    <ItemStyle CssClass="gridColLarge" HorizontalAlign="right" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblMinDealNotional" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MinDealNotional").ToString)%>' />
                                    </ItemTemplate>
                                    <%-- <EditItemTemplate>
                                <asp:TextBox ID="txtMinDealNotional" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MinDealNotional").ToString)%>'></asp:TextBox>
                            </EditItemTemplate>--%>
                                </asp:TemplateField>
                                <%--column43--%>
                                <asp:TemplateField HeaderText="Maximum Deal Notional" ControlStyle-Width="140">
                                    <HeaderStyle Width="140px" wrap="true"/>
                                    <ItemStyle Width="140px" HorizontalAlign="right" Wrap="false"/>
                                    <ItemTemplate>
                                        <asp:Label ID="lblMaximumDealNotional" CssClass="lbl" runat="server" Wrap="true" Width="100%" Style="word-wrap: break-word; word-break: break-all; display: inline;" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MaximumDealNotional").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtMaximumDealNotional" runat="server" CssClass="txt alignRight" MaxLength="10" onchange="$(this).val(FormatNotional($(this).val()))"
                                            Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(Convert.ToDecimal(DataBinder.Eval(Container, "DataItem.MaximumDealNotional")).ToString("N2"))%>'></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>

                                  <%-- Start//<$Nilesh Shelar | 17-April-2020 |Changes done | JIRA Ref: RHBUPMY-483 Add columns CreatedBy,CreatedAt,UpdatedBy,UpdatedAt columns in special Spread Setup>--%>
                                    <asp:TemplateField HeaderText="Created At" ControlStyle-Width="170">
                                        <HeaderStyle Width="170px" />
                                        <ItemStyle Width="170px" HorizontalAlign="Center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblCreatedAt" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.CreatedAt").ToString)%>' />
                                        </ItemTemplate>
                                        <%--<EditItemTemplate>
                                            <asp:TextBox ID="txtMaximumDealNotional" runat="server" CssClass="txt alignRight" MaxLength="10" onchange="$(this).val(FormatNotional($(this).val()))"
                                                Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(Convert.ToDecimal(DataBinder.Eval(Container, "DataItem.MaximumDealNotional")).ToString("N2"))%>'></asp:TextBox>
                                        </EditItemTemplate>--%>
                                         <FooterTemplate>
                                            <asp:TextBox ID="txtCreatedAt" runat="server" Text="" readonly="true"  AutoPostBack="true" CssClass="txt alignRight" Width="170px" MaxLength="10" onchange="$(this).val(FormatNotional($(this).val()))" onkeydown="return EnterEvent(event)"></asp:TextBox>
                                        </FooterTemplate>
                                              </asp:TemplateField>

                                             <asp:TemplateField HeaderText="Created By" ControlStyle-Width="90">
                                        <HeaderStyle Width="100px" />
                                    <ItemStyle Width="100px" HorizontalAlign="Left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblCreatedBy" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.CreatedBy").ToString)%>' />
                                        </ItemTemplate>
                                        <%--<EditItemTemplate>
                                            <asp:TextBox ID="txtMaximumDealNotional" runat="server" CssClass="txt alignRight" MaxLength="10" onchange="$(this).val(FormatNotional($(this).val()))"
                                                Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(Convert.ToDecimal(DataBinder.Eval(Container, "DataItem.MaximumDealNotional")).ToString("N2"))%>'></asp:TextBox>
                                        </EditItemTemplate>--%>
                                         <FooterTemplate>
                                            <asp:TextBox ID="txtCreatedBy" runat="server" Text="" readonly="true" AutoPostBack="true" CssClass="txt alignRight" Width="100px" MaxLength="10" onchange="$(this).val(FormatNotional($(this).val()))" onkeydown="return EnterEvent(event)"></asp:TextBox>
                                        </FooterTemplate>
 </asp:TemplateField>

                                                 <asp:TemplateField HeaderText="Updated At" ControlStyle-Width="170">
                                        <HeaderStyle Width="170px" />
                                        <ItemStyle Width="170px" HorizontalAlign="Center" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblUpdatedAt" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UpdatedAt").ToString)%>' />
                                        </ItemTemplate>
                                        <%--<EditItemTemplate>
                                            <asp:TextBox ID="txtMaximumDealNotional" runat="server" CssClass="txt alignRight" MaxLength="10" onchange="$(this).val(FormatNotional($(this).val()))"
                                                Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(Convert.ToDecimal(DataBinder.Eval(Container, "DataItem.MaximumDealNotional")).ToString("N2"))%>'></asp:TextBox>
                                        </EditItemTemplate>--%>
                                         <FooterTemplate>
                                            <asp:TextBox ID="txtUpdatedAt" runat="server" Text="" readonly="true" AutoPostBack="true" CssClass="txt alignRight" Width="170px" MaxLength="10" onchange="$(this).val(FormatNotional($(this).val()))" onkeydown="return EnterEvent(event)"></asp:TextBox>
                                        </FooterTemplate>
                                                      </asp:TemplateField>

                                             <asp:TemplateField HeaderText="Updated By" ControlStyle-Width="90">
                                        <HeaderStyle Width="100px" />
                                    <ItemStyle Width="100px" HorizontalAlign="Left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblUpdatedBy" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UpdatedBy").ToString)%>' />
                                        </ItemTemplate>
                                        <%--<EditItemTemplate>
                                            <asp:TextBox ID="txtMaximumDealNotional" runat="server" CssClass="txt alignRight" MaxLength="10" onchange="$(this).val(FormatNotional($(this).val()))"
                                                Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(Convert.ToDecimal(DataBinder.Eval(Container, "DataItem.MaximumDealNotional")).ToString("N2"))%>'></asp:TextBox>
                                        </EditItemTemplate>--%>
                                         <FooterTemplate>
                                            <asp:TextBox ID="txtUpdatedBy" runat="server" Text="" readonly="true"  AutoPostBack="true" CssClass="txt alignRight" Width="100px" MaxLength="10" onchange="$(this).val(FormatNotional($(this).val()))" onkeydown="return EnterEvent(event)"></asp:TextBox>
                                        </FooterTemplate>
                                    </asp:TemplateField>

                                  <%--  END //<$Nilesh Shelar | 17-April-2020 |Changes done | JIRA Ref: RHBUPMY-483 Add columns CreatedBy,CreatedAt,UpdatedBy,UpdatedAt columns in special Spread Setup>--%>

                                <%--column44--%>
                                <asp:TemplateField HeaderText="Spread Type" Visible="False">
                                    <HeaderStyle CssClass="gridCol" />
                                    <ItemStyle CssClass="gridCol" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblSpreadType" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.SpreadType").ToString)%>' />
                                    </ItemTemplate>
                                    <%--<EditItemTemplate>
                                <asp:TextBox ID="txtSpreadType" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.SpreadType").ToString)%>'></asp:TextBox>
                            </EditItemTemplate>--%>
                                </asp:TemplateField>
                                <%--column45--%>
                                <asp:TemplateField HeaderText="Staff Indicator" ControlStyle-Width="60" visible ="False" >
                                    <HeaderStyle Width="70px" />
                                    <%--<ItemStyle Width="70px" HorizontalAlign="left" />--%>
                                    <ItemTemplate>
                                        <asp:Label ID="lblStaffIndicator" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(If(IsDBNull(DataBinder.Eval(Container, "DataItem.BankStaffYN").ToString), "Default", DataBinder.Eval(Container, "DataItem.BankStaffYN").ToString))%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <%-----------------------Pooja S || Changed to dropdown || 7th-March-2017----------------------------%>
                                        <asp:DropDownList ID="ddlStaffIndicator" CssClass="ddl" runat="server">
                                        </asp:DropDownList>
                                        <%-- <asp:TextBox ID="txtStaffIndicator" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(If(IsDBNull(DataBinder.Eval(Container, "DataItem.BankStaffYN").ToString), "Default", DataBinder.Eval(Container, "DataItem.BankStaffYN").ToString))%>'>
                                </asp:TextBox>--%>
                                        <%-----------------------Pooja S || Changed to dropdown || 7th-March-2017----------------------------%>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--column46--%>

                         


                                <%----------------------------------End Pooja S || 6th-Mar-2017--------------------------------%>
                                <asp:TemplateField HeaderText="Special Spread Old" ControlStyle-Width="70" Visible ="false" >
                                    <HeaderStyle CssClass="gridColNum" />
                                    <ItemStyle CssClass="gridColNum" HorizontalAlign="right" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblSalesSpreadOld" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.SalesSpread_Old").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtSalesSpread_Old" runat="server" CssClass="txt alignRight" onKeyPress="return allowNegativeDecimalNumber_NEW(this,event);"
                                            Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.SalesSpread_Old").ToString)%>'></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                  <%--column47--%>
                                <%----------------------------------Pooja S || 6th-Mar-2017--------------------------------%>
                                <asp:TemplateField HeaderText="Bid Type Old" ControlStyle-Width="70" Visible ="false"  >
                                    <HeaderStyle CssClass="gridColNum" />
                                    <ItemStyle CssClass="gridColNum" HorizontalAlign="right" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblBidType_Old" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BidType_Old").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtBidType_Old" runat="server" CssClass="txt alignRight" onKeyPress="return allowNegativeDecimalNumber_NEW(this,event);"
                                            Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BidType_Old").ToString)%>'></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                 <%--column48--%>
                                <%--ToDo - check binding column name--%>
                                <asp:TemplateField HeaderText="Bid Value Old" ControlStyle-Width="70" Visible ="false" >
                                    <HeaderStyle CssClass="gridColNum" />
                                    <ItemStyle CssClass="gridColNum" HorizontalAlign="right" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblBidValue_Old" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BidValue_OLD").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtBidValue_Old" runat="server" CssClass="txt alignRight" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BidValue_OLD").ToString)%>'></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                 <%--column49--%>
                                <asp:TemplateField HeaderText="Offer Type Old" ControlStyle-Width="70" Visible="false">
                                    <HeaderStyle CssClass="gridColNum" />
                                    <ItemStyle CssClass="gridColNum" HorizontalAlign="left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblOfferType_Old" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.OfferType_Old").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtOfferType_Old" runat="server" CssClass="txt alignRight" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.OfferType_Old").ToString)%>'></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                 <%--column50--%>
                                <asp:TemplateField HeaderText="Offer Value Old" ControlStyle-Width="70" Visible="false">
                                    <HeaderStyle CssClass="gridColNum" />
                                    <ItemStyle CssClass="gridColNum" HorizontalAlign="right" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblOfferValue_Old" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.OfferValue_Old").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtOfferValue_Old" runat="server" CssClass="txt alignRight" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.OfferValue_Old").ToString)%>'></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                 <%--column51--%>
                                <%----------------------------------End Pooja S || 6th-Mar-2017--------------------------------%>

                                <%----------------------------------Pooja S || Commented || 6th-Mar-2017--------------------------------%>

                                <%--<asp:TemplateField HeaderText="BankStaffYN" visible="false">
                                        <HeaderStyle CssClass="gridCol" />
                                        <ItemStyle  cssClass="gridCol" horizontalalign="left"/>  
                                        <ItemTemplate>
                                            <asp:Label ID="lblBankStaffYN" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BankStaffYN").ToString)%>' />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtBankStaffYN" runat="server"  CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BankStaffYN").ToString)%>' ></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>--%>



                              

                                <%----------------------------------End Pooja S || Commented || 6th-Mar-2017--------------------------------%>
                            </Columns>
                        </asp:GridView>
                    </td>
                </tr>
                 <asp:Button ID="btnConfirmation" runat="server" Width="0" Style="width: 0px; height: 0px; font-size: 0; border: none; display: none;" />

                </table>


            <%-- <div class="lowerDiv">--%>
            <%--  <asp:GridView ID="gvSpreads" runat="server" AllowPaging="True" AllowSorting="True"
                            AutoGenerateColumns="False" BorderStyle="None" BorderWidth="0px" CellPadding="3" PagerStyle-Height="32px"
                            CssClass="Grid" PageSize="10" ShowHeaderWhenEmpty="true" HeaderStyle-CssClass="GridHeaderTitle">    --%>
            <%-- </div>--%>
        </ContentTemplate>

        <Triggers>
            <asp:PostBackTrigger ControlID="btnExport" />
        </Triggers>

    </asp:UpdatePanel>

    <script type="text/javascript">

        function TxRowsPerPage_TextChanged(e) {
            if (e.keyCode == 13) {
                document.getElementById('<%=btnLoad.ClientID%>').focus();
            }
            else if (event.keyCode >= 48 && event.keyCode <= 57)
                return;
        }



        function DeleteSpecialSpreads() {
            if (confirm("Do you want to delete the selected record(s)?") == true)
                return true;
            else
                return false;
        }


        function Check_Click(chkBox) {

            var row = chkBox.parentNode.parentNode.parentNode;
            var GridView = row.parentNode;

            //Get all input elements in Gridview
            var inputList = GridView.getElementsByTagName("input");

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

                var headerCheckBox = inputList[0];
                var checked = true;

                if (inputList[i].type == "checkbox" && inputList[i] != headerCheckBox) {
                    if (!inputList[i].checked) {
                        checked = false;
                        break;
                    }
                }
            }
            headerCheckBox.checked = checked;
        }

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

            for (var i = 0; i < inputList.length; i++) {
                if (inputList[i].type == "checkbox" && chkAll != inputList[i]) {
                    if (chkAll.checked) {
                        inputList[i].checked = true;
                    }
                    else {
                        inputList[i].checked = false;
                    }
                }
            }
        }
    </script>

</asp:Content>
