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


<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:scriptmanagerproxy id="scriptmanagerproxy1" runat="server"></asp:scriptmanagerproxy>
    <script src="../FinIQJS/SortFilter_Grid.js"></script>

    <script type="text/javascript">

        function BlankDefault(txt) {

            txt.value = ""
            div_lblcode.style.display = "none";
        }

        function hideshow(txt, event) {
            
            var label = document.getElementById("<%=lblInfo_Share.ClientID %>");
            var lblexchangelong = document.getElementById("<%=lblExchangLongtxt.ClientID %>");

            lblexchangelong.innerHTML = $(txt).closest("div").parent().parent().parent().parent().prev().find("table").find("tr").find("[id$=lblExchangLong]").html()
            var Share = ""
            var shareLongName = document.getElementById("<%=lblShareLongName.ClientID %>");
           shareLongName.innerHTML = ":" + $(txt).parent().closest("tr").closest("td").find("[id$=HiddenShareLongName]").val();

           Share = $(txt).parent().closest("tr").closest("td").find("[id$=lblHiddencode]").val();
           label.innerHTML = Share.split("-")[1];
           var div_lblcode = document.getElementById("<%=div_lblcode.ClientID %>");

            div_lblcode.style.display = "none";
            if (div_lblcode.style.display == "none") {
                event = window.event ? window.event : event;
                event.stopPropagation();
                var x = event.pageX;
                var y = event.pageY;

                div_lblcode.style.display = "block";
                div_lblcode.style.right = "20px";//Number(x) + "px";
                div_lblcode.style.top = (Number(y)) - 100 + "px";
                div_lblcode.style.position = "absolute";


                $(document).on("click", function () {

                    return true;
                });


            }

            var path_Name = window.location.pathname;
            var myPageName = path_Name.substring(path_Name.lastIndexOf('/') + 1);
            $.ajax({
                type: "POST",
                url: "" + path_Name + "/display_ProductInfornmation",
                cache: false,
                async: true,

                data: "{'Share':'" + Share + "'}",
                dataType: "text",
                contentType: "application/json; charset=utf-8",
                crossDomain: true,
                complete: function (XMLHttpRequest, textStatus, errorThrown) {

                },
                success: OnSuccess,
                failure: function (response) {

                },
                error: function (response) {

                }

            });
        }

        function OnSuccess(response) {
            $("#grdSharDetails").empty();

            var $tr = $('<tr class="GridHeader">').append(
			  $('<th style="width:0px;" Visible="false">'),
           $('<th style="width:60px;" class="centerAlign">').text("Note Master ID"),
            $('<th style="width:450px;" class="centerAlign">').text("Product Name"),
           $('<th style="width:96px;" class="centerAlign">').text("Maturity Date"),
           $('<th style="width:80px;" class="centerAlign">').text("Currency")
          ).appendTo("#grdSharDetails");

            
            if (response != null || response != undefined) {

                if ($.parseJSON(response).d.length > 0) {
                    var obj = $.parseJSON(response).d;
                    var trHTML = '';
                    $(obj).each(function (i, item) {

                        var MONTH_NAMES1 = new Array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
                        var dateTime = new Date(parseInt(item.Maturity_Date.substr(6), 10)); // for now
                        var day = Number(dateTime.getDate());
                        day = (day < 10 ? "0" + day : day);
                        var month = dateTime.getMonth();
                        var year = dateTime.getFullYear();

                        var datetext = day + "-" + MONTH_NAMES1[month] + "-" + year;// + " " + h + ":" + m + ":" + s + " " + t;

                        var $tr = $('<tr class="GridItem">').append(
                        $('<td id="hiddentokenID" >').html('<input type="hidden" value="'+item.TokenID+'" />'),
                        $('<td style="width:60px;" class="centerAlign">').html('<a href="#" onclick="showDiv('+item.note_master_id+','+item.TokenID+');">' + item.note_master_id + '</a>'),

                        $('<td style="width:450px;" class="leftAlign">').text(item.Product_Name),
                           $('<td style="width:96px;white-space:nowrap;" class="centerAlign">').text(datetext),
                           $('<td style="width:80px;"class="centerAlign">').text(item.Currency)
                       ).appendTo("#grdSharDetails");

                    });

                }
            }
            try {
                SetSorting_Filter1();
            } catch (er) { }
        }

        function showDiv(NoteMasterid,TokenID) {
            
            var url = '';
            var url_string = window.location.href;
            var url = new URL(url_string);
            var csrfToken = url.searchParams.get("csrfToken");
            //var TokenID = "53759";
            window.open('../UCP/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPWFL&DealNum=D:&NoteMasterid=N:'+ NoteMasterid +'&TokenID=T:'+ TokenID +'&QueueID=Q:&WorkflowTypeID=&ButtonID=7&ButtonName=&ButtonCaption=&Master_Popup=POPUP', '', 'top=150,left=250,status=1,scrollbars=1,resizable=1,width=1300,height=800');
           // window.open('../UCP/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPWFL&DealNum=D:&NoteMasterid=N:' + NoteMasterid + '&TokenID=T:' + TokenID + '&QueueID=Q:&WorkflowTypeID=&ButtonID=7&ButtonName=&ButtonCaption=&AnotherUCP=N&Master_Popup=POPUP', '', 'top=150,left=250,status=1,scrollbars=1,resizable=1,width=1300,height=800');
        }




        function SomeValueChanged(txt,event) {
            
           if (event.type === 'focus') {
                this.addEventListener('mouseup', reset, false);
                this.addEventListener('keyup', reset, false);
            }
            if (length != 0) {
              
            var len = this.value.length;
            this.setSelectionRange(len, len);
            }
          


            var label = document.getElementById("<%=lblError.ClientID %>");
            var Price = "";
            var Exchange = ""
            var Share = ""
            var date = ""
            Share = $(txt).parent().closest("tr").closest("td").find("[id$=lblHiddencode]").val();
            Exchange = $(txt).closest("div").parent().parent().parent().parent().prev().find("table").find("tr").find("[id$=lblExchange]").html()

            var path_Name = window.location.pathname;
            var myPageName = path_Name.substring(path_Name.lastIndexOf('/') + 1);
            Price = txt.value;
            var re = new RegExp("^[-]?([0-9]{0,})*[.]?([0-9]{0,9})?$");
            if (re.test(Price)) {

                $.ajax({
                    type: "POST",
                    url: "" + path_Name + "/UpdateSharePrice",
                    cache: false,
                    async: true,

                    data: "{'Exchanges':'" + Exchange + "', 'Share':'" + Share + "', 'Price':'" + Price + "'}",
                    dataType: "text",
                    contentType: "application/json; charset=utf-8",
                    crossDomain: true,
                    complete: function (XMLHttpRequest, textStatus, errorThrown) {

                    },
                    success: function (data) {
                        label.innerHTML = "Index rate updated successfully.";

                    },
                    error: function (e, ts, et) { label.innerHTML = "Error while updating"; }


                });
            } else {
                var seconds = 55;

                setTimeout(document.getElementById("<%=lblError.ClientID %>"), seconds * 1000);
                label.innerHTML = "Invalid Input";
                txt.value = "______"
                Thread.Sleep(30);


            }



        }




        function NoPostback() {
            event.returnValue = false;
        }


    </script>


    <style type="text/css">
	
	.centerAlign{
	text-align:center;
	}
		.leftAlign{
	text-align:left;
	}
		.rightAlign{
	text-align:right;
	}
	.lnkE2E input[type="submit"]{
	
	text-align:right;
	color: rgb(0, 159, 255) !important;
	background-color: #FFF !important;
	border: solid 1px #FFF !important;
	box-shadow: none !important; 
	width:100px;
	
	}
	.ShareDetailsContainer
	{
	display: none;
    border-radius: 10px;
    width: 710px;
    height: auto; 
    position: absolute;
    box-shadow: 3px 3px 4px #666;
    border: solid 1px #ddd;
    border-collapse: collapse;
	}
	
	.ShareDetailsContainer table table{
	 
	}
	.lblInfo_share{ 
	 font: normal 14px/32px Verdana, Helvetica, sans-serif !important;
	 color:#000;
	 padding:5px;
	}
        .hideToggle, .showToggle, .EnableToggle, .DisableToggle {
            width: 126px !important;
            height: 22px !important;
            border: none 0px #FFF !important;
            color: #FFF !important;
            outline: 0 !important;
            background-color: #FFFFFF;
            background-repeat: no-repeat;
        }

        .DispToggle, .CollapseToggle {
            width: 20px !important;
            height: 20px !important;
            border: none 0px #FFF !important;
            color: #FFF !important;
            outline: 0 !important;
            background-color: #FFFFFF;
            background-repeat: no-repeat;
        }

        .DispToggle {
            background-image: url("../App_Resources/plus1.png");
        }

        .CollapseToggle {
            background-image: url("../App_Resources/minus_1.png");
        }

        .showToggle {
            background-image: url("../App_Resources/Hide_Actions.png");
        }

        .hideToggle {
            background-image: url("../App_Resources/Show_Actions.png");
        }

        .EnableToggle {
            background-image: url("../App_Resources/Disabled_Actions.png");
        }

        .DisableToggle {
            background-image: url("../App_Resources/Enabled_Actions.png");
        }

        .headerow {
            border: solid 1px #DCDCDC;
        }

        .footerrow {
            border: solid 1px #DCDCDC;
        }

        #txtForPrice {
            border: 1px solid White !important;
            color: #cccccc !important;
            Font-weight: Bold;
        }

        #imgUpDown {
            background-image: url("../App_Resources/default_img.png");
        }

        .inputs {
            border: 1px;
            color: white;
        }

        .GridCSS {
            border-bottom: 1px solid #000;
            text-decoration: none;
            border-style: none;
            border: White;
        }

        #dvCode table {
            float: left;
            margin: 2px;
        }

        .lblHeader {
            font: normal 14px/14px Verdana, Helvetica, sans-serif !important;
            color: #000000 !important;
            margin: 0px !important;
        }

        .btn, .btn:hover {
            text-align: left !important;
            box-shadow: 0px 2px #ddd !important;
            outline: none !important;
        }
        .Grid, .grid {
            border: solid 1px #dddddd;
            border-collapse: collapse;
        }

        #grdSharDetails {
            max-height:500px !important;
            overflow-y:scroll;
        }

        .GridItem > td, .Grid > td, .AlternatItemStyle > td, .GridItemLcl td, .GridFooter > td, .GridItemSelect > td {
           
             border-bottom: solid 1px #dddddd !important;
            border-right: solid 1px #ffffff !important;
            border-top: solid 1px #dddddd !important;
            border-left: solid 1px #ffffff !important;
            padding: 8px;
            vertical-align: middle;
        }

		th.leftAlign {
			padding: 0px 0px 0px 10px;
		}
    </style>


    <asp:updatepanel id="UpdatePanel1" runat="server" updatemode="conditional">
        <ContentTemplate>

            <table class="Filter" style ="border:none"> 
                            
                            <tr> 

                                <td style="min-width:110px; border:none ; border: none; font-family: Verdana;  font: normal 11px/23px verdana; vertical-align: middle;display: block ">
                                   <asp:Label ID="lblDealCount" runat="server" style="padding-top:8px; margin-left:40px; vertical-align:top !important; margin-right:10px" Text="Deal count"></asp:Label>
                                    </td>
                                <td>
                                    <asp:Button runat="server" ID="btnShow"  Visible="True" Text="" class="showToggle" />
                                         <asp:Button runat="server" ID="btnHide" Visible="false"  Text="" class="hideToggle" />

                                   </td>
                                <td style="width:30px">

                                </td>
                                   <td>
                            <asp:Label ID="lblddlExchange" runat="server"  Text="Exchange"></asp:Label>        
<asp:DropDownList ID="ddlExchange" Width="300px" runat="server"  Style="margin-left:45px;" CssClass="ddl" AutoPostBack="true"></asp:DropDownList>
</td>
                          
                                </tr>
          <tr style="padding:5px">
			<td colspan="4"></td>
          </tr>
                   
                              <tr>
                                  <td>
                                        <asp:Label ID="lblEditIndex" runat="server" style="padding-top:8px; margin-left:40px; vertical-align:top !important; margin-right:10px" Text="Edit"></asp:Label>
                                      </td>
                                  <td>
                                        <asp:Button runat="server" ID="btnEnabled"  Visible="false" Text="" class="EnableToggle" />
                                        <asp:Button runat="server" ID="btnDisabled" Text="" class="DisableToggle" />

                                  </td>
                                  <td style="width:30px">

                                  </td>
                                  <td>
                                            <asp:Button id="btnExpandAll"  Style="text-align:center !important; width:90px ;margin-right:8px" Text="Expand All" runat="server" CssClass="btn" />
                                           <asp:Button id="btnCollapseAll"  Style="text-align:center !important; width:90px;margin-right:8px" Text="Collapse All" runat="server" CssClass="btn" />
                                            <asp:Button id="btnLoadAll"  Style="text-align:center !important; width:90px" Text="Load" runat="server" CssClass="btn" />

                                  </td>  
                                      </tr> 
                <tr>
                    <td colspan="4">
                        <asp:Label ID="lblError" runat="server" CssClass="lblerror"></asp:Label>
                    </td>
                </tr> 
            </table>
              
                       <table>
                           <tr>
                               <td>
                               <div id="divshares" style="display:inline-block;" runat="server">
                             <asp:DataList ID="dtlstExhanges" style=" border-bottom:1px solid #DDDDDD !important ;" runat="server"  OnItemDataBound="outerRep_ItemDataBound"  RepeatDirection="Horizontal" RepeatLayout="Table" RepeatColumns="1">
                               
                            <ItemTemplate> 
                   <br />  
                                  <div  style="border-bottom: 1px solid #DDDDDD !important;padding-top:10px; display:inline-block; min-width:100%;">                                       
                                         <table style="width:100%;">
                                             <tr>
                                                 <td style="width:2px"><asp:Button runat="server" ID="btnDisp" OnClick="Expand_exchange" CommandArgument='<%#Eval("SettlementMode")%>'  class="DispToggle" OnChange="NoPostback()"  /></td>
                                                 <td style="width:2px"><asp:Button runat="server" ID="btncollapse" Visible="false" OnClick="Collapse_exchange" CommandArgument='<%#Eval("SettlementMode")%>' class="CollapseToggle" OnChange="NoPostback()" /></td>
                                                 <td style="width:30%; white-space:nowrap; padding:5px;">
												 <asp:Label ID="lblExchange"  runat="server" CssClass="lblHeader" Text='<%#Eval("SettlementMode")%>'></asp:Label> 
                                                <asp:Label ID="lblExchangLong"  runat="server" Text='<%#Eval("Long_Name")%>'></asp:Label> 
                                                <asp:Label ID="lblHiddenshares"  runat="server" Visible="false"></asp:Label>
												</td>
												 <td>
												 <asp:Label ID="lblTotalCount" Margin-left="20px" runat="server" Visible="false"> </asp:Label>
												 <asp:Label ID="lbltxtRecord" Text="Record(s)" Style="margin-left:4px !important" runat="server" Visible="false"></asp:Label>
												 </td> 
                                                 <td style="width:5%; white-space:nowrap; padding:5px; "><asp:LinkButton ID="LinkCurrent" runat="server" style="" Text="Current Mid" forecolor="#4da6ff" CommandArgument='<%# Eval("SettlementMode") %>' OnClick="CurrentShare_Click"></asp:LinkButton>  
												 </td>
                                                 <td style="width:5%; white-space:nowrap; padding:5px; "><asp:LinkButton ID="LinkButton1" runat="server" style="" forecolor="#4da6ff" CommandArgument='<%# Eval("SettlementMode") %>' OnClick="T_OnlnkButton_Click"></asp:LinkButton>  
												 </td>
                                                 <td style="width:5%; white-space:nowrap; padding:5px; padding-left:10px;"><asp:LinkButton ID="LinkButton2" runat="server" style="" forecolor="#4da6ff" CommandArgument='<%# Eval("SettlementMode") %>' OnClick="T_OnlnkButton_Click"> </asp:LinkButton> 
												 </td>
                                            </tr>
                                         </table> 
                                   </div>  
                                    
									<asp:DataList ID="dtlstShares" Visible="false" style="margin-top: 5px !important; margin-bottom:10px; margin-left: 5px !important; "  runat="server" RepeatDirection="Horizontal" RepeatLayout="Table" RepeatColumns="6" >
                                      <ItemTemplate>
                                     
                                              <div ID="dvCode" style= "padding-top:10px; padding-top:10px; display:inline-block; max-width:320px; " >
                                                  <table style="border:none 0px #fff; border-collapse:collapse; width:100%; " cellpadding="0" cellspacing="0">
                                                      <tr id="Tr2" runat="server">
                                                          <td ID="tdBlank" Style="width:17px" Visible="false" runat="server">

                                                          </td>
                                                          <td style="text-align:left;">
                                                                <asp:HiddenField ID="HiddenShareLongName" Value='<%# Eval("LongName")%>' runat="server" />
                                                                 <asp:HiddenField ID="lblHiddencode" Value='<%# Eval("IM_Index_Code")%>' runat="server" />
                                                                <asp:Label ID="lblcode" style="" runat="server" Text='<%# Eval("IM_Index_Code_Copy")%>' onclick="hideshow(this, event);" > </asp:Label>
                                                          </td>
                                                          <td style="text-align:left; width:50px" id="tdCount" runat="server">  
                                                               <asp:Label ID="lblDealCount1" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Deal_Count").ToString)%>'></asp:Label>
                                                             <%--Data Bar Chart for Deal Count added by TwinkleC  19-09-2019--%>
                                                            <asp:Chart ID="ChartBarDC" runat="server" Height="28px" Width="200px" BackImageAlignment="Center" visible="true">
                                                                <Series>
                                                                    <asp:Series ChartType="Bar" CustomProperties="BarLabelStyle=Center,PixelPointWidth=18" Color="#c8c8c8" BorderDashStyle="Solid" BorderWidth="1" IsValueShownAsLabel="true" >
                                                                        <SmartLabelStyle AllowOutsidePlotArea="No" />
                                                                        
                                                                        <Points>
                                                                           
                                                                         </Points>
                                                                    </asp:Series>
                                                                </Series>
                                                                <ChartAreas>
                                                                    <asp:ChartArea>
                                                                        <InnerPlotPosition Auto ="true">
                                                                            
                                                                        </InnerPlotPosition>
                                                                        <AxisX LineWidth="0" IsMarginVisible="true">
                                                                            <MajorGrid Enabled="false" />
                                                                            <LabelStyle Enabled="false" />
                                                                            <MajorTickMark Enabled="false" />
                                                                        </AxisX>
                                                                        <AxisY LineWidth="0" Maximum="1500">
                                                                            <MajorGrid Enabled="false" />
                                                                            <LabelStyle Enabled="false" />
                                                                            <MajorTickMark Enabled="false" />
                                                                        </AxisY>
                                                                    </asp:ChartArea>
                                                                </ChartAreas>
                                                            </asp:Chart>
                                                             <%--Data Bar Chart for Deal Count end added by TwinkleC  19-09-2019--%>
                                                           
                                                           </td> 
                                                          <td>

                                                          </td>
                                                      </tr>
                                                      <tr>
                                                          <td id="tdImage" Style="width:17px" Visible="false" runat="server" > 
                                                               <asp:ImageButton ID="imgUpDown" Visible="false" Width="17px" Height="17px" runat="server" ImageUrl='<%#Eval("IMG_URL") %>' /></asp:ImageButton>
                                                          </td>
                                                          <td  style="text-align:left; ">  
                                                                 <asp:TextBox ID="txtForPrice" Font-size="14px" Text='<%#Eval("IH_Fixing_Value")%>' width="90px" Text-ForeColor="white" runat="server" onclick="BlankDefault(this)" OnChange="SomeValueChanged(this,event)" style="border: 1px Dashed white !important ; margin-left:-5px; color: #C0C0C0 !important;" AutoPostBack="true"  />
                                                            
                                                              
                                                           </td>
                                                          <td id="ChartIndex1" Visible="false" runat="server" >   
                                                                <asp:Chart ID="ChartIndex" runat="server" Height="35px" Width="30px" Visible = "False" autopostback="False">
                                                                 
                                                             <Series>
                                                                   <asp:Series Name="series" ChartType="Line" MarkerStyle="Circle" BorderWidth="1" MarkerSize="3" MarkerColor="#2b5e88" Color="#4b8fc5">
                                                                       <Points>
                                                                           
                                                                       </Points>
                                                                   </asp:Series>
                                                               </Series>
                                                               <ChartAreas>
                                                                   <asp:ChartArea Name="chartArea1">
                                                                       <AxisX Enabled="False" IsMarginVisible="false"></AxisX>
                                                                       <AxisY minimum="30" Enabled="False" ></AxisY>
                                                                   </asp:ChartArea>
                                                               </ChartAreas>
                                                      </asp:Chart></td>
                                                    
                                                          <td style="width:45px">

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

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

                                                  </table> 
                                              </div> 
                                      </ItemTemplate> 
                                  </asp:DataList> 
                            </ItemTemplate> 
                        </asp:DataList>
                               </div>
                                   </td>
                       <td>
                       <div id="div_lblcode" class="ShareDetailsContainer"  runat="server"> 
                           <table >
                               <tr><th class="leftAlign"><asp:Label ID="lblExchangLongtxt"  runat="server" ></asp:Label>
                                   <asp:Label ID="lblInfo_share" cssClass="lblInfo_share"  runat="server" > </asp:Label>
                                   <asp:Label ID="lblShareLongName" cssClass="lblInfo_share"  runat="server" > </asp:Label>
                                   </th>
                                   <th class="rightAlign lnkE2E"> <asp:Button ID="btnExport" runat="server" CssClass="btn" Text="Export To Excel" /></th>
							  
							   </tr>
							
                               <tr><td colspan="2" style="max-height:500px !important"> 
                                 <table ID="grdSharDetails" style="padding-left:16px !important ; " BorderStyle="none" class="Grid" cellspacing="0" cellpading="0" border="0 !important"></table>  
                                   </td></tr>
                           </table>       
                       </div>
                            </td> 
                           </tr> 
                       </table>
                          
            <div id="divddlDisplay" Visible="false" runat="server">
                <table style=" border-bottom:1px solid #DDDDDD !important ; margin-left:40px!important">
                    <tr> 
                        <td><asp:Label ID="lblExchangeddl"  runat="server" CssClass="lblHeader"> </asp:Label></td>
                        <td> <asp:Label ID="lblExchangLong"  runat="server" Text='<%#Eval("Long_Name")%>'></asp:Label> </td>
                                                 <td>
                                                     <asp:Label ID="lblopen1" Margin-right="-3px" runat="server" Text="(" Visible="false"></asp:Label>
                                                     <asp:Label ID="lblHiddenshares" Margin-left="20px" runat="server" Visible="false"></asp:Label>
                                                     <asp:Label ID="lblclose1"  Margin-left="-3px" runat="server" Text=")" Visible="false"></asp:Label>
                                                 </td>
                                                 <td style="width:500px; white-space:nowrap; padding:5px;"> </td>
                                                 <td style="width:5%; white-space:nowrap; padding:5px; "><asp:LinkButton ID="LinkButton1" runat="server" style="" forecolor="#4da6ff" CommandArgument='<%# Eval("SettlementMode") %>' OnClick="T_OnlnkButton_Click"></asp:LinkButton>  </td>
                                                 <td style="width:5%; white-space:nowrap; padding:5px; padding-left:10px;"><asp:LinkButton ID="LinkButton2" runat="server" style="" forecolor="#4da6ff" CommandArgument='<%# Eval("SettlementMode") %>' OnClick="T_OnlnkButton_Click"> </asp:LinkButton> </td>
                </tr>

                </table>
                
                               <asp:DataList ID="dtlstSharesddl" Visible="false" style="margin-top: 5px !important; margin-bottom:10px; margin-left: 5px !important; "  runat="server" RepeatDirection="Horizontal" RepeatLayout="Table" RepeatColumns="6" >
                                      <ItemTemplate>
                                     
                                              <div ID="dvCode" style= "padding-top:10px; padding-top:10px; display:inline-block; max-width:320px; margin-left:33px;">
                                                  <table style="border:none 0px #fff; border-collapse:collapse; width:100%; " cellpadding="0" cellspacing="0">
                                                      <tr id="Tr1" runat="server">
                                                          <td ID="tdBlank" Visible="false" runat="server">

                                                          </td>
                                                          <td style="text-align:left;">
                                                               
                                                                 <asp:HiddenField ID="lblHiddencode" Value='<%# Eval("IM_Index_Code")%>' runat="server" />
                                                                <asp:Label ID="lblcode" style="" runat="server" Text='<%# Eval("IM_Index_Code_Copy")%>' onclick="hideshow(this, event);" > </asp:Label>
                                                          </td>
                                                          <td style="text-align:left; width:50px" id="tdCount" runat="server">
                                                                    (<asp:Label ID="lblDealCount1" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Deal_Count").ToString)%>'></asp:Label>)
                                                          </td>
                                                          
                                                      </tr>
                                                      <tr>
                                                          <td id="tdImage" Style="width:12px" Visible="false" runat="server" > 
                                                               <asp:ImageButton ID="imgUpDown" Visible="false" Width="17px" Height="17px" runat="server" ImageUrl='<%#Eval("IMG_URL") %>' /></asp:ImageButton>
                                                            
                                                          </td>
                                                          <td  style="text-align:left;">  
                                                               
                                                                 <asp:TextBox ID="txtForPrice" Font-size="14px" Text='<%#Eval("IH_Fixing_Value")%>' width="130px" Text-ForeColor="white" runat="server" onclick="BlankDefault(this)" OnChange="SomeValueChanged(this)" style="border: 1px Dashed white !important ; margin-left:-5px; color: #C0C0C0 !important;" AutoPostBack="true"  />
                                                            
                                                          </td>
                                                     <td>

                                                     </td>
                                                        <br />
                                                            
                                                      </tr> 
                                                  </table> 
                                              </div> 
                                      </ItemTemplate>  
                                  </asp:DataList>
            </div>
        </ContentTemplate>
      <Triggers>
            <asp:PostBackTrigger ControlID="btnExport" />
     
        </Triggers>
    </asp:updatepanel>

</asp:Content>

