locked
How to make Javascript RRS feed

  • Question

  • User-582711651 posted

    Hi, 

    Anyone, please help me, ref my see my below image, this is ModelPopup window of Aspx form, (Jquery not works), when I click dropdown then two actions need to work, one is IDT column should accumulate like 2,3,4 to save into one temp variable (as per image) and simultaneously  Loan Amt should be sum to save into one variable. 

    Jquery not works in my modal-pop window hence, request you to pls share Javascript. 

    See my image (linked in URL),

    Grid_ModelPopup

    Thanks in advance. 

    Thursday, September 20, 2018 2:00 AM

Answers

  • User-893317190 posted

    Hi ayyappan.CNN ,

    It seems that you use my code and haven't changed it according to your gridview.

    My table's html structure is not the same as yours, so you should change it according to your own html.

    For example, in your case ,  code should be var row = $(this).parent().parent().parent(); instead of var row = $(this).parent().parent(); 

    And row.children(":eq(1)") represents the second child of the row,  eq(2) the third , eq(3) the fourth. My table only have three columns and yours have more columns, you should choose you wanted column according to the index of the column.

    You still write the code    $("#idt").html(idtSum.slice(0, idtSum.lastIndexOf(","))); $("#loan").html(loanAmtSum);, but I haven't find an element with the id idt or loan, have you added the two element?

    If you don't know how to change my code according to your aspx , I suggest you could refer to jquery official site and search the jquery method I have used in my code.

    https://api.jquery.com/

    In my  opinion,if you use javascript , the code will more complex .I really suggest you could use jquery.

    Below is my changed code. But still a little different from yours. You could use F12 developer tool to help you get the structure of your gridview and change your code accordint to the structure.

     <script src="Scripts/jquery-3.3.1.js"></script>
    
            <script type="text/javascript">
                $(function () {
    
                    $("#Grv_CGL_Product_List :checkbox").on('change', function () {
                      
                        var idtSum = "";
                        var loanAmtSum = 0;
                        $("#code").html("");
                        $("#Grv_CGL_Product_List :checkbox:checked").each(
                            function () {
                                var row = $(this).parent().parent().parent();
                                idtSum += row.children(":eq(1)").html().trim() + ",";
                                loanAmtSum += parseFloat(row.children(":eq(3)").find("span").html().trim());
                            }
    
                        )
    
                        $("#idt").html(idtSum.slice(0, idtSum.lastIndexOf(",")));
                        $("#loan").html(loanAmtSum);
                    })
    
    
                })
    
            </script>
    
    
    
    
    <form id="Form1" method="post" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
         IDTSum:  <span id="idt"></span>   &nbsp;&nbsp;&nbsp;&nbsp;  LoanAmtSum: <span id="loan"></span> &nbsp;&nbsp;&nbsp;&nbsp;
            ProductCode: <span id="code"></span>
    
            <asp:UpdatePanel ID="UPCL" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
             
                                                                                                  
                                                                        
                    <asp:Panel ID="Pnl_InNos" runat="server" Height="256px" Width="122px" BorderColor="#6666FF"
                BorderStyle="Solid" BorderWidth="1px">
                <table>
                <tr><td></td>
                <td>
                <asp:GridView ID="Grv_IWNos" runat="server" AutoGenerateColumns="False" CellPadding="4" 
                            CssClass="smalltext2" ForeColor="#333333" GridLines="Vertical">
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    <Columns>
                        <asp:BoundField DataField="HD" HeaderText="Code" />
                        <asp:BoundField DataField="PR_ID" HeaderText="IW NO" >
                        <ItemStyle ForeColor="#0000CC" />
                        </asp:BoundField>
                    </Columns>
                    <EditRowStyle BackColor="#999999" />
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#E9E7E2" />
                    <SortedAscendingHeaderStyle BackColor="#506C8C" />
                    <SortedDescendingCellStyle BackColor="#FFFDF8" />
                    <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                </asp:GridView>
                </td>
                </tr>
                </table>
            </asp:Panel>
            
    
            <asp:Panel id="pnl_CGLProdt_list" runat="server" Width="700px" Height="650px" BackColor="#9CAAC1">
             <table class="style95">
                    <tr>
                        <td>
                            &nbsp;</td>
                        <td>
                            <table class="style95">
                                <tr>
                                    <td class="style96">
                                        <asp:Label ID="Lbl_MemberName" runat="server"></asp:Label>
                                    </td>
                                    <td class="style97">
                                        <asp:Label ID="Lbl_LoanAmt" runat="server"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:Label ID="idt" runat="server"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:Label ID="loan" runat="server"></asp:Label>
                                    </td>
                                    <td><span id="code"></span>
                                        &nbsp;</td>
                                </tr>
                            </table>
                        </td>
                        <td rowspan="2" valign="top">
                            <asp:ImageButton ID="Img_Btn_Close" runat="server" Height="30px" 
                                ImageUrl="~/Images/UserConsole_ICO/CloseBtnPNG.png" Width="30px" />
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;</td>
                        <td>
                            <asp:Panel ID="Pnl_CGL_Pr_Gr2" runat="server" ScrollBars="Auto" Height="284px">
                            
    
    
                            <asp:GridView ID="Grv_CGL_Product_List" runat="server" 
                                AutoGenerateColumns="False" CellPadding="4" CssClass="smalltext Grid" 
                                ForeColor="#333333">
                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                <Columns>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="cbx_cgl" runat="server" CssClass="normalText2" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="IDT" HeaderText="IDT" />
                                    <asp:BoundField DataField="Productcode" HeaderText="Product Code" />
                           
                                    <asp:TemplateField HeaderText="Loan Amt.">
                                        <ItemTemplate>
                                            <asp:Label ID="lblValue" runat="server" Text='<%# Eval("LoanAmt") %>'></asp:Label>
                                            
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <EditRowStyle BackColor="#999999" />
                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                            </asp:GridView>
                            </asp:Panel>
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                    </tr>
                </table>
              
                </asp:Panel>
    
    
                  
    
                    <ajaxToolkit:ModalPopupExtender ID="MPE_CGL_POPU" runat="server" TargetControlID="btnHidden2"
                        PopupControlID="pnl_CGLProdt_list" PopupDragHandleControlID="PopupHeader" BackgroundCssClass="modalBackground"
                        CancelControlID="img_btn_Close" Drag="true">
                    </ajaxToolkit:ModalPopupExtender>
                    <asp:Button ID="btnHidden2" runat="Server"  Text="button" />
                </ContentTemplate>
            </asp:UpdatePanel>
    
           
    
           
            </form>
    </body>
    </html>
    

    Code behind.

     Private constr As String = ConfigurationManager.ConnectionStrings("userItem").ConnectionString
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Dim Sql As String = "select * from products"
            If Not IsPostBack Then
    
                Using adapter As SqlDataAdapter = New SqlDataAdapter(Sql, constr)
    
                    Dim table As DataTable = New DataTable()
                    adapter.Fill(table)
                    Grv_CGL_Product_List.DataSource = table
                    Grv_CGL_Product_List.DataBind()
                End Using
    
            End If
        End Sub
    

    And the result.

    Best regards,

    Ackerly Xu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 21, 2018 2:16 AM
  • User-582711651 posted

    Hi Ackerly Xu, 

    Thanks, you did a lot for me.

    I tried it works when I include ModalPopupExtender it does not work, after my continues research, I found a solution in Javascript it works well, pls refer my below Javascript ...

    (I have modified and updated, so the below final and corrected, works well with update panel & <g class="gr_ gr_25 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="25" data-gr-id="25">modalpopup</g> extender)

    <script type="text/javascript">  
    function chk_cglv2(cgl_prodx) {
                    if (cgl_prodx.checked == true) {
                        var l_value = 0;
                        var idt_cum = "";
    
                        var cg_gvx = document.getElementById('Grv_CGL_Product_List');
    
                        for (rxi = 1; rxi < cg_gvx.rows.length; rxi++) {
    
                            if (cg_gvx.rows[rxi].cells[0].getElementsByTagName('input')[0].checked == true) {
                                cg_gvx.rows[rxi].style.backgroundColor = 'yellow';
                                idt_cum += (cg_gvx.rows[rxi].cells[2].innerHTML).trim() + ",";
                                l_value += parseInt((cg_gvx.rows[rxi].cells[5].innerHTML).trim());
                            }
                        }
    
                        document.getElementById('idt').innerHTML = (idt_cum.slice(0, idt_cum.lastIndexOf(",")));
                        document.getElementById('loan').innerHTML = l_value;
    
                    }
                    else {
                        var l_value = 0;
                        var idt_cum = "";
    
                        var cg_gvx = document.getElementById('Grv_CGL_Product_List');
    
                        for (rxi = 1; rxi < cg_gvx.rows.length; rxi++) {
    
                            if (cg_gvx.rows[rxi].cells[0].getElementsByTagName('input')[0].checked == true) {
                                idt_cum += (cg_gvx.rows[rxi].cells[2].innerHTML).trim() + ",";
                                l_value += parseInt((cg_gvx.rows[rxi].cells[5].innerHTML).trim());
                            }
                        }
    
                        document.getElementById('idt').innerHTML = (idt_cum.slice(0, idt_cum.lastIndexOf(",")));
                        document.getElementById('loan').innerHTML = l_value;
                    }
                }
    </script>

    But possible pls share your inputs, after the <g class="gr_ gr_349 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="349" data-gr-id="349">modalpopup</g> extender implementation why that Jquery script not works?

    anyhow Thanks for your valuable support. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 21, 2018 6:02 PM

All replies

  • User-893317190 posted

    Hi ayyappan.CNN ,

    I try to simulate your table and meet your requirement using jquery and make a success.

    Below is my code.

     <form id="form1" runat="server">
           <table  id="table" class="table table-bordered">
    
               <thead>
    <tr>
        <th>check</th><th>IDT</th><th>ProductCode</th><th>LoanAmt.</th>
    </tr>
               </thead>
    
              <tbody>
                  
                  <tr>
                      <td>
                          <input type="checkbox"  /></td><td>1</td><td> 103214</td><td> 6700.00</td>
                  </tr>
                  
                  <tr>
                      <td>
                          <input type="checkbox"  /></td><td>2</td><td> 117339</td><td> 7700.00</td>
                  </tr>
                  
    
                  <tr>
                      <td>
                          <input type="checkbox"  /></td><td>3</td><td> 117307</td><td> 10000.00</td>
                  </tr>
                  
                  <tr>
                      <td>
                          <input type="checkbox"  /></td><td>4</td><td> 117308</td><td> 14000.00</td>
                  </tr>
                  
                  <tr>
                      <td>
                          <input type="checkbox"  /></td><td>5</td><td> 106657</td><td> 12900.00</td>
                  </tr>
                  
                  <tr>
                      <td>
                          <input type="checkbox"  /></td><td>6</td><td>118208</td><td>14200.00</td>
                  </tr>
                  
                  <tr>
                      <td>
                          <input type="checkbox"  /></td><td>7</td><td>116893</td><td>13900.00</td>
                  </tr>
                  
                  <tr>
                      <td>
                          <input type="checkbox"  /></td><td>8</td><td>116399</td><td>15000.00</td>
                  </tr>
                  
                  <tr>
                      <td>
                          <input type="checkbox"  /></td><td>9</td><td>117171</td><td>21000.00</td>
                  </tr>
    
                 
              </tbody>
           </table>
    
             IDTSum:  <span id="idt"></span>   &nbsp;&nbsp;&nbsp;&nbsp;  LoanAmtSum: <span id="loan"></span> &nbsp;&nbsp;&nbsp;&nbsp;
            ProductCode: <span id="code"></span>
    
            <script>
    
                $(function () {
    
                    $("#table :checkbox").on('change', function () {
                        var idtSum = "";
                        var loanAmtSum = 0;
                        $("#code").html("");
                        $("#table :checkbox:checked").each(
                            function () {
                                var row = $(this).parent().parent();
                                idtSum += row.children(":eq(1)").html().trim()+",";
                                loanAmtSum += parseFloat(row.children(":eq(3)").html().trim());
                              
                            }
    
                        )
    
                       $("#idt").html(idtSum.slice(0, idtSum.lastIndexOf(",")));
                        $("#loan").html(loanAmtSum);
                    })
    
    
                })
    
            </script>
        </form>

    The result.

    If you still have problem, please post your code to let us give an answer to your code.

    Best regards,

    Ackerly Xu

    Thursday, September 20, 2018 8:28 AM
  • User-582711651 posted

    Hi Ackerly, 

    I tried, but <g class="gr_ gr_10 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" id="10" data-gr-id="10">its</g> not working, am using Grid hence I modified <g class="gr_ gr_8 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep" id="8" data-gr-id="8">little</g> bit, pls check this, and for your information, I inserted this grid in ModelPop with Update panel. but my existing Javascript was working, I mentioned that after this, pls refer. 

      <script src="JScript/jquery-1.9.1.min.js" type="text/javascript"></script>
            <script type="text/javascript">
                $(function () {
    
                    $("#Grv_CGL_Product_List :checkbox").on('change', function () {
                        alert('s1');
                        var idtSum = "";
                        var loanAmtSum = 0;
                        $("#code").html("");
                        $("#Grv_CGL_Product_List :checkbox:checked").each(
                            function () {
                                var row = $(this).parent().parent();
                                idtSum += row.children(":eq(1)").html().trim() + ",";
                                loanAmtSum += parseFloat(row.children(":eq(3)").html().trim());
                            }
    
                        )
                        $("#idt").html(idtSum.slice(0, idtSum.lastIndexOf(",")));
                        $("#loan").html(loanAmtSum);
                    })
    
    
                })
    
            </script>

    My existing Javascript which was working,

    <ItemTemplate>
    <asp:CheckBox ID="cbx_cgl" runat="server" CssClass="normalText2" onclick="cgl_tst(this)" />
    </ItemTemplate>
    .........
    ..........

    function cgl_tst(Chk_ctrl) { var value = 0; var chkrow; var grid = document.getElementById('Grd_KYC_Txns'); if (grid.rows.length > 0) { var chk = grid.rows[0].cells[0]; for (i = 1; i < grid.rows.length; i++) { if ((grid.rows[i]) == true) { alert('for testing '); } } } }

    Thanks, 

    Thursday, September 20, 2018 10:48 AM
  • User-893317190 posted

    Hi ayyappan.CNN,

    I post my code is only to tell you that jquery could do this in my code, it is similar to your table.

    However, you haven't post your aspx page(perhaps with code behind) , so it is hard to write corresponding code to your aspx page.

    Please post your aspx page to let us  write js according  to your real code instead of simulate your code.

    Best regards,

    Ackerly Xu

    Thursday, September 20, 2018 11:03 AM
  • User-582711651 posted

    Dear Ackerly, 

    My <g class="gr_ gr_39 gr-alert gr_gramm gr_inline_cards gr_run_anim Style multiReplace" id="39" data-gr-id="39">Aspx ,</g> (important part only) 

       <script src="JScript/jquery-1.9.1.min.js" type="text/javascript"></script>
            <script type="text/javascript">
                $(function () {
    
                    $("#Grv_CGL_Product_List :checkbox").on('change', function () {
                        alert('s1');
                        var idtSum = "";
                        var loanAmtSum = 0;
                        $("#code").html("");
                        $("#Grv_CGL_Product_List :checkbox:checked").each(
                            function () {
                                var row = $(this).parent().parent();
                                idtSum += row.children(":eq(1)").html().trim() + ",";
                                loanAmtSum += parseFloat(row.children(":eq(3)").html().trim());
                            }
    
                        )
    
                        $("#idt").html(idtSum.slice(0, idtSum.lastIndexOf(",")));
                        $("#loan").html(loanAmtSum);
                    })
    
    
                })
    
            </script>
    
    
    
    
    <form id="Form1" method="post" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <asp:UpdatePanel ID="UPCL" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
               <table style="border-collapse: collapse; width: 825px;" bordercolor="#111111" cellspacing="0"
                        cellpadding="0" align="center" border="0">
                        <tbody>
                            <tr>
                                <td bgcolor="#f4f7f9">
                                    <table style="border-collapse: collapse; width: 923px;" bordercolor="#111111" cellspacing="0"
                                        cellpadding="0" border="0">
                                        <tbody>
                                            <tr>
                                                <td bgcolor="#f4f7f9">
                                                    <table cellspacing="0" cellpadding="0" border="0">
                                                        <tbody>
                                                            <tr>
                                                                <td>
                                                                </td>
                                                                <td bgcolor="#f4f7f9">
                                                                    <table style="border-collapse: collapse; width: 1021px; height: 358px;" bordercolor="#111111"
                                                                        cellspacing="0" cellpadding="4" border="0">
                                                                        <tbody>
                                                                            <tr>
                                                                                <td class="lead17" bgcolor="#f4f7f9">
                                                                                    <table style="border-collapse: collapse" bordercolor="#111111" cellspacing="0" cellpadding="0"
                                                                                        width="100%" border="0">
                                                                                        <tr>
                                                                                            <td align="center" width="100%">
                                                                                                <table style="border-collapse: collapse" bordercolor="#111111" cellspacing="0" cellpadding="0"
                                                                                                    width="100%" border="0">
                                                                                                    <tr>
                                                                                                        <td width="2">
                                                                                                            <img src="images/icoCompanyLeaveDetails.gif" width="29" border="0">
                                                                                                        </td>
                                                                                                        <td class="style92">
                                                                                                            <p align="left">
                                                                                                                <span class="tablehead">&nbsp;
                                                                                                                    <asp:Label ID="lblcaption" runat="server">COC - Inward Transactions</asp:Label></span></p>
                                                                                                        </td>
                                                                                                        <td align="left">
                                                                                                            <asp:Label ID="Lbl_UserName" runat="server" Font-Bold="True" 
                                                                                                                ForeColor="#000099"></asp:Label>
                                                                                                        </td>
                                                                                                    </tr>
                                                                                                </table>
                                                                                            </td>
                                                                                        </tr>
                                                                                    </table>
                                                                                    <asp:Panel ID="pnlEmpSummary" runat="server" DESIGNTIMEDRAGDROP="45" Width="1021px">
                                                                                        <table style="border-collapse: collapse; width: 1027px; height: 50px;" 
                                                                                            bordercolor="#111111" cellspacing="0"
                                                                                            cellpadding="0" border="0">
                                                                                            <tr>
                                                                                                <td class="style4">
                                                                                                    <img height="3" alt="" src="Images/b-ulb.gif" width="8" border="0">
                                                                                                </td>
                                                                                                <td width="526" background="Images/b-tbg.gif">
                                                                                                </td>
                                                                                                <td width="8">
                                                                                                    <img height="3" alt="" src="Images/b-urb.gif" width="8" border="0">
                                                                                                </td>
                                                                                            </tr>
                                                                                            <tr>
                                                                                                <td valign="top" background="Images/b-lbg.gif" >
                                                                                                </td>
                                                                                                <td class="txt" valign="top" align="left">
                                                                                                    <table id="table5" cellspacing="1" cellpadding="1" border="0">
                                                                                                        <tr>
                                                                                                            <td background="images/dotes-b2.gif" class="style27">
                                                                                                            </td>
                                                                                                            <td class="style39">
                                                                                                                <table style="width: 976px">
                                                                                                                    <tr>
                                                                                                                        <td class="style56">
                                                                                                                            <asp:Label ID="Label5" runat="server" CssClass="normalText2" Text="Emp.Code:"></asp:Label>
                                                                                                                        </td>
                                                                                                                        <td class="style56">
                                                                                                                            <asp:TextBox ID="txt_empcode" runat="server" CssClass="normalText2" 
                                                                                                                                Width="50px"></asp:TextBox>
                                                                                                                        </td>
                                                                                                                        <td class="style87">
                                                                                                                            <asp:Button ID="Btn_Submit_empchk" runat="server" CssClass="normalText2" 
                                                                                                                                Text="Verify" />
                                                                                                                        </td>
                                                                                                                        <td class="style87">
                                                                                                                            <asp:Label ID="Lbl_Last_IwNo" runat="server" CssClass="tablehead" 
                                                                                                                                ForeColor="#009933">-</asp:Label>
                                                                                                                        </td>
                                                                                                                        <td>
                                                                                                                            <asp:Label ID="Label10" runat="server" CssClass="normalText2" 
                                                                                                                                Text="Txn.From:"></asp:Label>
                                                                                                                        </td>
                                                                                                                        <td class="style50">
                                                                                                                            <asp:TextBox ID="Txt_TxnPeriod_From" runat="server" CssClass="normalText2" 
                                                                                                                                Width="88px"></asp:TextBox>
                                                                                                                            <cc1:MaskedEditExtender ID="MaskedEditExtender1" runat="server" 
                                                                                                                                Mask="99/99/9999" MaskType="Date" PromptCharacter=" " 
                                                                                                                                TargetControlID="Txt_TxnPeriod_To" UserDateFormat="DayMonthYear">
                                                                                                                            </cc1:MaskedEditExtender>
                                                                                                                            <cc1:CalendarExtender ID="CalendarExtender1" runat="server" Format="dd/MM/yyyy" 
                                                                                                                                PopupButtonID="Img_FrDt" TargetControlID="Txt_TxnPeriod_From">
                                                                                                                            </cc1:CalendarExtender>
                                                                                                                        </td>
                                                                                                                        <td class="style51">
                                                                                                                            <asp:Image ID="Img_FrDt" runat="server" Height="17px" 
                                                                                                                                ImageUrl="~/Images/Ico_Dt.gif" Width="21px" />
                                                                                                                        </td>
                                                                                                                        <td class="style53">
                                                                                                                            &nbsp;</td>
                                                                                                                        <td class="style49">
                                                                                                                            <asp:Label ID="Label12" runat="server" CssClass="normalText2" Text="To:"></asp:Label>
                                                                                                                        </td>
                                                                                                                        <td class="style50">
                                                                                                                            <asp:TextBox ID="Txt_TxnPeriod_To" runat="server" CssClass="normalText2" 
                                                                                                                                Width="88px"></asp:TextBox>
                                                                                                                            <cc1:MaskedEditExtender ID="MaskedEditExtender2" runat="server" 
                                                                                                                                Mask="99/99/9999" MaskType="Date" PromptCharacter=" " 
                                                                                                                                TargetControlID="Txt_TxnPeriod_To" UserDateFormat="DayMonthYear">
                                                                                                                            </cc1:MaskedEditExtender>
                                                                                                                            <cc1:CalendarExtender ID="CalendarExtender2" runat="server" Format="dd/MM/yyyy" 
                                                                                                                                PopupButtonID="Img_ToDt" TargetControlID="Txt_TxnPeriod_To">
                                                                                                                            </cc1:CalendarExtender>
                                                                                                                        </td>
                                                                                                                        <td class="style84">
                                                                                                                            <asp:Image ID="Img_ToDt" runat="server" Height="17px" 
                                                                                                                                ImageUrl="~/Images/Ico_Dt.gif" Width="21px" />
                                                                                                                        </td>
                                                                                                                        <td>
                                                                                                                            <asp:CompareValidator ID="cmpVal1" runat="server" 
                                                                                                                                ControlToCompare="Txt_TxnPeriod_From" ControlToValidate="Txt_TxnPeriod_To" 
                                                                                                                                ErrorMessage="*Invali.Dt" ForeColor="Red" Operator="GreaterThanEqual" 
                                                                                                                                Type="Date" CssClass="smalltext2"></asp:CompareValidator>                                                                                                                        
                                                                                                                        </td>
                                                                                                                        <td>
                                                                                                                            <asp:Button ID="Btn_Submit" runat="server" CssClass="normalText2" Text="Submit" 
                                                                                                                                Width="55px" />
                                                                                                                        </td>
                                                                                                                        <td>
                                                                                                                            <asp:Button ID="Btn_Menu" runat="server" CssClass="normalText2" Text="Menu" 
                                                                                                                                Width="55px" />
                                                                                                                        </td>
                                                                                                                        <td>
                                                                                                                            <asp:Button ID="Btn_CancelReset1" runat="server" CssClass="normalText2" 
                                                                                                                                Text="Reset" Width="65px" />
                                                                                                                        </td>
                                                                                                                        <td>
                                                                                                                            <asp:Button ID="Btn_IW_Nos" runat="server" BorderColor="#33CC33" 
                                                                                                                                CssClass="normalText2" Text=" IW No." Width="65px" />
                                                                                                                        </td>
                                                                                                                    </tr>
                                                                                                                </table>
                                                                                                            </td>
                                                                                                        </tr>
                                                                                                    </table>
                                                                                                </td>
                                                                                                <td valign="top" width="8" background="Images/b-rbg.gif">
                                                                                                </td>
                                                                                            </tr>
                                                                                            <tr>
                                                                                                <td class="style4">
                                                                                                    <img height="17" alt="" src="Images/b-bl.gif" width="8" border="0">
                                                                                                </td>
                                                                                                <td width="526" background="Images/b-bbg.gif">
                                                                                                    &#160;&#160;
                                                                                                </td>
                                                                                                <td width="8">
                                                                                                    <img height="17" alt="" loop="0" src="Images/b-br.gif" width="8" border="0">
                                                                                                </td>
                                                                                            </tr>
                                                                                        </table>
                                                                                    </asp:Panel>
                                                                                    <asp:Panel ID="pnlSalGradeSelection" runat="server" Width="1021px">
                                                                                        <table id="table2" style="border-collapse: collapse; width: 1021px;" bordercolor="#111111"
                                                                                            cellspacing="0" cellpadding="0" border="0">
                                                                                            <tr>
                                                                                                <td width="8">
                                                                                                    <img height="3" alt="" src="Images/b-ulb.gif" width="8" border="0">
                                                                                                </td>
                                                                                                <td width="526" background="Images/b-tbg.gif">
                                                                                                </td>
                                                                                                <td width="8">
                                                                                                    <img height="3" alt="" src="Images/b-urb.gif" width="8" border="0">
                                                                                                </td>
                                                                                            </tr>
                                                                                            <tr>
                                                                                                <td valign="top" width="8" background="Images/b-lbg.gif">
                                                                                                </td>
                                                                                                <td class="txt" valign="top" align="left" width="482" bgcolor="white">
                                                                                                    <table id="table6" height="61" cellspacing="1" cellpadding="1" border="0">
                                                                                                        <tr>
                                                                                                            <td class="style60">
                                                                                                                &#160;
                                                                                                            </td>
                                                                                                            <td colspan="2">
                                                                                                                &#160;
                                                                                                            </td>
                                                                                                        </tr>
                                                                                                        <tr>
                                                                                                            <td bgcolor="#f4f7f9" class="style60">
                                                                                                                &#160;
                                                                                                            </td>
                                                                                                            <td bgcolor="#f4f7f9" colspan="2">
                                                                                                                <asp:Panel ID="Panel2" runat="server" Height="103px">
                                                                                                                    <table class="style46">
                                                                                                                        <tr>
                                                                                                                            <td>
                                                                                                                                <asp:Panel ID="Pnl_Sel_Prams" runat="server" GroupingText="** Prameters **" 
                                                                                                                                    Height="90px" Width="972px">
                                                                                                                                    
                                                                                                                                    <%--<table class="style57">
                                                                                                                                        <tr>
                                                                                                                                            <td class="style62">
                                                                                                                                                <asp:Label ID="Label13" runat="server" CssClass="normalText2" Text="Status :"></asp:Label>
                                                                                                                                            </td>
                                                                                                                                            <td class="style63">
                                                                                                                                                <table class="style57">
                                                                                                                                                    <tr>
                                                                                                                                                        <td>
                                                                                                                                                            <asp:CheckBox ID="ChkBox_CB_ResAuthd" text="CB Respo.Auth'd" runat="server" />
                                                                                                                                                        </td>
                                                                                                                                                        <td>
                                                                                                                                                            <asp:CheckBox ID="ChkBox_CB_Verifn" runat="server" text="CB.Verifn" />
                                                                                                                                                        </td>
                                                                                                                                                        <td>
                                                                                                                                                            <asp:CheckBox ID="ChkBox_ReconsAppvl" runat="server" text="Reconsider.Appvl" />
                                                                                                                                                        </td>
                                                                                                                                                        <td>
                                                                                                                                                            <asp:CheckBox ID="ChkBox_RjRecondrStg" runat="server" text="Rj.Recondr.stage" />
                                                                                                                                                        </td>
                                                                                                                                                        <td>
                                                                                                                                                            <asp:CheckBox ID="ChkBox_RjClBasicCbRespoAuthn" runat="server" 
                                                                                                                                                                text="Rj.Cl.Basic -CbRespo.Authn" />
                                                                                                                                                        </td>
                                                                                                                                                        <td>
                                                                                                                                                            <asp:CheckBox ID="ChkBox_Sanction" runat="server" 
                                                                                                                                                                text="Sanction" />
                                                                                                                                                        </td>
                                                                                                                                                        <td>
                                                                                                                                                            &nbsp;</td>
                                                                                                                                                    </tr>
                                                                                                                                                    <tr>
                                                                                                                                                        <td>
                                                                                                                                                            &nbsp;</td>
                                                                                                                                                        <td>
                                                                                                                                                            &nbsp;</td>
                                                                                                                                                        <td>
                                                                                                                                                            &nbsp;</td>
                                                                                                                                                        <td>
                                                                                                                                                            &nbsp;</td>
                                                                                                                                                        <td>
                                                                                                                                                            &nbsp;</td>
                                                                                                                                                        <td>
                                                                                                                                                            &nbsp;</td>
                                                                                                                                                        <td>
                                                                                                                                                            &nbsp;</td>
                                                                                                                                                    </tr>
                                                                                                                                                </table>
                                                                                                                                            </td>
                                                                                                                                            <td >
                                                                                                                                                <asp:Button ID="Btn_Generate" runat="server" CssClass="normalText2" 
                                                                                                                                                    Height="50px" Text="Generate" Width="62px" />
                                                                                                                                                </td>
                                                                                                                                        </tr>
                                                                                                                                    </table>--%>
                                                                                                                                <table class="style57">
                                                                                                                                    <tr>
                                                                                                                                        <td class="style83">
                                                                                                                                            &nbsp;</td>
                                                                                                                                        <td class="style76">
                                                                                                                                            <asp:Label ID="Label8" runat="server" CssClass="normalText2" Text="Branch :"></asp:Label>
                                                                                                                                        </td>
                                                                                                                                        <td class="style85">
                                                                                                                                            <asp:DropDownList ID="Drd_BranchID" runat="server" AutoPostBack="True" 
                                                                                                                                                CssClass="normalText2" Width="200px">
                                                                                                                                                <asp:ListItem Value="0">Select One</asp:ListItem>
                                                                                                                                            </asp:DropDownList>
                                                                                                                                        </td>
                                                                                                                                        <td class="style82">
                                                                                                                                            <asp:Label ID="Label9" runat="server" CssClass="normalText2" Text="Group :"></asp:Label>
                                                                                                                                        </td>
                                                                                                                                        <td>
                                                                                                                                            <asp:DropDownList ID="Drd_GroupID" runat="server" AutoPostBack="True" 
                                                                                                                                                CssClass="normalText2" Width="200px">
                                                                                                                                                <asp:ListItem Value="0">Select One</asp:ListItem>
                                                                                                                                            </asp:DropDownList>
                                                                                                                                        </td>
                                                                                                                                        <td>
                                                                                                                                            <asp:RadioButton ID="Rbt_MEL" runat="server" Checked="True" GroupName="SProd" Text="MEL" onclick="clr_gridview();"/>
                                                                                                                                        </td>
                                                                                                                                        <td>
                                                                                                                                            <asp:RadioButton ID="Rbt_CGL" runat="server" GroupName="SProd" Text="CGL" onclick="clr_gridview();"/>
                                                                                                                                        </td>
                                                                                                                                        <td>
                                                                                                                                            <asp:RadioButton ID="Rbt_MSME" runat="server" GroupName="SProd" Text="MSME" onclick="clr_gridview();"/>
                                                                                                                                        </td>
                                                                                                                                        <td>
                                                                                                                                            <asp:RadioButton ID="Rbt_EL" runat="server" GroupName="SProd" Text="EL" onclick="clr_gridview();"/>
                                                                                                                                        </td>
                                                                                                                                        <td>
                                                                                                                                            <asp:Button ID="Btn_Generate_final" runat="server" CssClass="normalText2" 
                                                                                                                                                Text="Generate" Width="65px" />
                                                                                                                                        </td>
                                                                                                                                    </tr>
                                                                                                                                </table>    
                                                                                                                                </asp:Panel>
                                                                                                                            </td>
                                                                                                                        </tr>
                                                                                                                        <tr>
                                                                                                                            <td>
                                                                                                                                
                                                                                                                            </td>
                                                                                                                        </tr>
                                                                                                                    </table>
                                                                                                                </asp:Panel>
                                                                                                            </td>
                                                                                                        </tr>
                                                                                                        <tr>
                                                                                                            <td class="style60">
                                                                                                                &#160;
                                                                                                            </td>
                                                                                                            <td colspan="2">
                                                                                                            </td>
                                                                                                        </tr>
                                                                                                    </table>
                                                                                                </td>
                                                                                                <td valign="top" width="8" background="Images/b-rbg.gif">
                                                                                                </td>
                                                                                            </tr>
                                                                                            <tr>
                                                                                                <td width="8">
                                                                                                    <img height="17" alt="" src="Images/b-bl.gif" width="8" border="0">
                                                                                                </td>
                                                                                                <td width="526" background="Images/b-bbg.gif">
                                                                                                    &#160;&#160;
                                                                                                </td>
                                                                                                <td width="8">
                                                                                                    <img height="17" alt="" loop="0" src="Images/b-br.gif" width="8" border="0">
                                                                                                </td>
                                                                                            </tr>
                                                                                        </table>
                                                                                    </asp:Panel>
                                                                                    <asp:Panel ID="Panel1" runat="server" Width="1010px" Height="289px">
                                                                                        <table id="table1" 
                                                                                            style="border-collapse: collapse; width: 1000px; height: 290px;" bordercolor="#111111"
                                                                                            cellspacing="0" cellpadding="0" border="0">
                                                                                            <tr>
                                                                                                <td width="8">
                                                                                                    <img height="3" alt="" src="Images/b-ulb.gif" width="8" border="0">
                                                                                                </td>
                                                                                                <td width="526" background="Images/b-tbg.gif">
                                                                                                </td>
                                                                                                <td width="8">
                                                                                                    <img height="3" alt="" src="Images/b-urb.gif" width="8" border="0">
                                                                                                </td>
                                                                                            </tr>
                                                                                            <tr>
                                                                                                <td valign="top" width="8" background="Images/b-lbg.gif">
                                                                                                </td>
                                                                                                <td class="txt" valign="top" align="left" width="990px" bgcolor="white">
                                                                                                    <table id="table3" height="61" cellspacing="1" cellpadding="1" border="0">
                                                                                                        <tr>
                                                                                                            <td class="style93">
                                                                                                                &#160;
                                                                                                            </td>
                                                                                                            <td colspan="2" align="center">
                                                                                                            <asp:Label ID="lbl_error_msg" runat="server" ForeColor="Red"></asp:Label>
                                                                                                            </td>
                                                                                                            <td>&nbsp;</td>
                                                                                                        </tr>
                                                                                                        <tr>
                                                                                                            <td bgcolor="#f4f7f9" class="style93">
                                                                                                               </td>
                                                                                                            <td bgcolor="#f4f7f9" colspan="2">
                                                                                                            <asp:Panel ID="Panel3" runat="server" Height="210px" ScrollBars="Auto" 
                                                                                                                    Width="953px">
                                                                                                                    <asp:GridView ID="Grd_KYC_Txns" runat="server" AutoGenerateColumns="False" 
                                                                                                                        CellPadding="4" CssClass="smalltext Grid" ForeColor="#333333" 
                                                                                                                        ItemStyle-Wrap="False">
                                                                                                                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                                                                                                        <Columns>
                                                                                                                            <asp:TemplateField>
                                                                                                                                <HeaderTemplate>
                                                                                                                                    <asp:CheckBox ID="checkAll" runat="server" onclick="SelectAll(this)" />
                                                                                                                                </HeaderTemplate>
                                                                                                                                <ItemTemplate>
                                                                                                                                    <asp:CheckBox ID="ChkBox_SelectRow" runat="server" CssClass="normalText2" />
                                                                                                                                </ItemTemplate>
                                                                                                                            </asp:TemplateField>
                                                                                                                            <asp:TemplateField HeaderText="Sr#">
                                                                                                                                <ItemTemplate>
                                                                                                                                    <%#Container.DataItemIndex + 1 %>
                                                                                                                                </ItemTemplate>
                                                                                                                            </asp:TemplateField>
                                                                                                                            
                                                                                                                            <asp:BoundField DataField="IDT" HeaderText="IDT"  ItemStyle-CssClass="Hide" 
                                                                                                                                HeaderStyle-CssClass="Hide" >
                                                                                                                            <HeaderStyle CssClass="Hide" />
                                                                                                                            <ItemStyle CssClass="Hide" />
                                                                                                                            </asp:BoundField>
                                                                                                                            <asp:BoundField DataField="Member_Name" HeaderText="Member Name" 
                                                                                                                                ItemStyle-ForeColor="Blue" >
                                                                                                                            <ItemStyle ForeColor="Blue" />
                                                                                                                            </asp:BoundField>
                                                                                                                            <asp:BoundField DataField="AADHAAR_ID" HeaderText="Aadhaar ID" /> 
                                                                                                                            <asp:BoundField DataField="Secondry_ID" HeaderText="Secondry ID">
                                                                                                                            <HeaderStyle CssClass="Hide" />
                                                                                                                            <ItemStyle CssClass="Hide" />
                                                                                                                            </asp:BoundField>
                                                                                                                            <asp:BoundField DataField="PHONE_NO" HeaderText="Contact No" 
                                                                                                                                ItemStyle-CssClass="Hide" HeaderStyle-CssClass="Hide">
                                                                                                                            <HeaderStyle CssClass="Hide" />
                                                                                                                            <ItemStyle CssClass="Hide" />
                                                                                                                            </asp:BoundField>
                                                                                                                            <asp:BoundField DataField="APPLD_AMT" HeaderText="Appd.Amt"/>
                                                                                                                            <asp:BoundField DataField="STATUS" HeaderText="Application Status" >
                                                                                                                            <ItemStyle ForeColor="Red" />
                                                                                                                            </asp:BoundField>
                                                                                                                            <asp:BoundField DataField="UPDT" HeaderText="Updt." />
                                                                                                                            <asp:TemplateField HeaderText="FLAG">
                                                                                                                                <ItemTemplate>
                                                                                                                                    <asp:DropDownList ID="Drd_IW_SeleFlag" runat="server" CssClass="normalText2" BackColor="#CCFFFF">
                                                                                                                                        <asp:ListItem Value="1">Mov.Inward</asp:ListItem>
                                                                                                                                        <asp:ListItem Value="2">Br.Pending</asp:ListItem>
                                                                                                                                        <asp:ListItem Value="3">Mem.Rejected</asp:ListItem>
                                                                                                                                    </asp:DropDownList>
                                                                                                                                </ItemTemplate>
                                                                                                                            </asp:TemplateField>
                                                                                                                            <asp:TemplateField HeaderText="Pending Type">
                                                                                                                                <ItemTemplate>
                                                                                                                                    <asp:DropDownList ID="Drd_IW_Res_Pending" runat="server" CssClass="normalText2" BackColor="#CCFFCC">
                                                                                                                                        <asp:ListItem Value="0">-[Select One]-</asp:ListItem>
                                                                                                                                        <asp:ListItem Value="1">Aadhaar Related</asp:ListItem>
                                                                                                                                        <asp:ListItem Value="2">Bank Passbook</asp:ListItem>
                                                                                                                                        <asp:ListItem Value="3">GreenSheet</asp:ListItem>
                                                                                                                                        <asp:ListItem Value="4">Member Mob#</asp:ListItem>
                                                                                                                                        <asp:ListItem Value="5">RC Related</asp:ListItem>
                                                                                                                                        <asp:ListItem Value="6">Nominee KYC</asp:ListItem>
                                                                                                                                        <asp:ListItem Value="7">Others</asp:ListItem>
                                                                                                                                        </asp:DropDownList>
                                                                                                                                </ItemTemplate>
                                                                                                                            </asp:TemplateField>
                                                                                                                            <asp:TemplateField HeaderText="Remarks">
                                                                                                                                <ItemTemplate>
                                                                                                                                    <asp:TextBox ID="Txt_Remarks" runat="server" CssClass="normalText2" MaxLength="250"></asp:TextBox>
                                                                                                                                    <%--<asp:TextBox ID="txtContactsSearch" runat="server"></asp:TextBox>--%>
                                                                                                                                    <cc1:AutoCompleteExtender ServiceMethod="SearchCustomers" MinimumPrefixLength="2"
                                                                                                                                        CompletionInterval="100" EnableCaching="false" CompletionSetCount="10" TargetControlID="Txt_Remarks"
                                                                                                                                        ID="AutoCompleteExtender1" runat="server" FirstRowSelected="false">
                                                                                                                                    </cc1:AutoCompleteExtender>
                                                                                                                                </ItemTemplate>
                                                                                                                            </asp:TemplateField>
                                                                                                                            <asp:BoundField DataField="PRD_TBL_IDT" HeaderText="P_T_IDT" >
                                                                                                                            <HeaderStyle CssClass="Hide" />
                                                                                                                            <ItemStyle CssClass="Hide" />
                                                                                                                            </asp:BoundField>
                                                                                                                            <asp:TemplateField HeaderText="CGL">
                                                                                                                            <ItemTemplate>
                                                                                                                             <asp:RadioButton ID="Rbt_CGL_products" runat="server" CssClass="normalText2" 
                                                                                                                                    CommandName="CGL_window_Pop" AutoPostBack="true" 
                                                                                                                                    oncheckedchanged="Rbt_CGL_products_CheckedChanged"/>
                                                                                                                             </ItemTemplate>
                                                                                                                            </asp:TemplateField>
                                                                                                                        </Columns>
                                                                                                                        <EditRowStyle BackColor="#999999" />
                                                                                                                        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                                                                                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                                                                                        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                                                                                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                                                                                                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                                                                                        <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                                                                                                        <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                                                                                                        <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                                                                                                        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                                                                                                                    </asp:GridView>
                                                                                                                </asp:Panel>
                                                                                                                </td>
                                                                                                        </tr>
                                                                                                        <tr>
                                                                                                            <td class="style93">
                                                                                                                &#160;
                                                                                                            </td>
                                                                                                            <td colspan="2">
                                                                                                            </td>
                                                                                                        </tr>
                                                                                                    </table>
                                                                                                </td>
                                                                                                <td valign="top" width="8" background="Images/b-rbg.gif">
                                                                                                </td>
                                                                                            </tr>
                                                                                            <tr>
                                                                                                <td width="8">
                                                                                                    <img height="17" alt="" src="Images/b-bl.gif" width="8" border="0">
                                                                                                </td>
                                                                                                <td width="526" background="Images/b-bbg.gif">
                                                                                                    &#160;&#160;
                                                                                                </td>
                                                                                                <td width="8">
                                                                                                    <img height="17" alt="" loop="0" src="Images/b-br.gif" width="8" border="0">
                                                                                                </td>
                                                                                            </tr>
                                                                                        </table>
                                                                                    </asp:Panel>
                                                                                    <asp:Panel ID="Panel4" runat="server" Width="1013px" Height="37px" 
                                                                                        BorderColor="#3366FF" BorderStyle="Solid" BorderWidth="1px">
                                                                                       
                                                                                        <table class="style86">
                                                                                            <tr>
                                                                                                <td class="style89">
                                                                                                    &nbsp;</td>
                                                                                                <td class="style90">
                                                                                                    <asp:Button ID="Btn_Update" runat="server" CssClass="normalText2" 
                                                                                                        Text="Update" Width="65px" />
                                                                                                </td>
                                                                                                <td class="style91">
                                                                                                    <asp:Button ID="Btn_CancelReset" runat="server" CssClass="normalText2" 
                                                                                                        Text="Reset" Width="65px" />
                                                                                                </td>
                                                                                                <td>
                                                                                                    <asp:Button ID="Btn_MainMenu2" runat="server" CssClass="normalText2" 
                                                                                                        Text="Menu" Width="65px" />
                                                                                                </td>
                                                                                                <td>
                                                                                                    &nbsp;</td>
                                                                                            </tr>
                                                                                        </table>
                                                                                        
                                                                                    </asp:Panel>
                                                                                </td>
                                                                            </tr>
                                                                        </tbody>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <asp:Panel ID="Pnl_InNos" runat="server" Height="256px" Width="122px" BorderColor="#6666FF"
                BorderStyle="Solid" BorderWidth="1px">
                <table>
                <tr><td></td>
                <td>
                <asp:GridView ID="Grv_IWNos" runat="server" AutoGenerateColumns="False" CellPadding="4" 
                            CssClass="smalltext2" ForeColor="#333333" GridLines="Vertical">
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    <Columns>
                        <asp:BoundField DataField="HD" HeaderText="Code" />
                        <asp:BoundField DataField="PR_ID" HeaderText="IW NO" >
                        <ItemStyle ForeColor="#0000CC" />
                        </asp:BoundField>
                    </Columns>
                    <EditRowStyle BackColor="#999999" />
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#E9E7E2" />
                    <SortedAscendingHeaderStyle BackColor="#506C8C" />
                    <SortedDescendingCellStyle BackColor="#FFFDF8" />
                    <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                </asp:GridView>
                </td>
                </tr>
                </table>
            </asp:Panel>
            <cc1:AlwaysVisibleControlExtender ID="Pnl_InNos_AlwaysVisibleControlExtender" 
                runat="server" Enabled="True" TargetControlID="Pnl_InNos" UseAnimation="True" 
                VerticalSide="Middle">
            </cc1:AlwaysVisibleControlExtender>
    
            <asp:Panel id="pnl_CGLProdt_list" runat="server" Width="700px" Height="650px" BackColor="#9CAAC1">
             <table class="style95">
                    <tr>
                        <td>
                            &nbsp;</td>
                        <td>
                            <table class="style95">
                                <tr>
                                    <td class="style96">
                                        <asp:Label ID="Lbl_MemberName" runat="server"></asp:Label>
                                    </td>
                                    <td class="style97">
                                        <asp:Label ID="Lbl_LoanAmt" runat="server"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:Label ID="idt" runat="server"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:Label ID="loan" runat="server"></asp:Label>
                                    </td>
                                    <td><span id="code"></span>
                                        &nbsp;</td>
                                </tr>
                            </table>
                        </td>
                        <td rowspan="2" valign="top">
                            <asp:ImageButton ID="Img_Btn_Close" runat="server" Height="30px" 
                                ImageUrl="~/Images/UserConsole_ICO/CloseBtnPNG.png" Width="30px" />
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;</td>
                        <td>
                            <asp:Panel ID="Pnl_CGL_Pr_Gr2" runat="server" ScrollBars="Auto" Height="284px">
                            
                            <asp:GridView ID="Grv_CGL_Product_List" runat="server" 
                                AutoGenerateColumns="False" CellPadding="4" CssClass="smalltext Grid" 
                                ForeColor="#333333">
                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                <Columns>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="cbx_cgl" runat="server" CssClass="normalText2" onclick="cgl_tst(this)"  />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="IDT" HeaderText="IDT" />
                                    <asp:BoundField DataField="Product_code" HeaderText="Product Code" />
                                    <asp:BoundField DataField="Product_Category" HeaderText="Category" />
                                    <asp:BoundField DataField="Product_List" HeaderText="Product Description" 
                                        ItemStyle-CssClass="smalltext2" >
                                    <ItemStyle CssClass="smalltext2" />
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="Loan Amt.">
                                        <ItemTemplate>
                                            <asp:Label ID="lblValue" runat="server" Text='<%# Eval("Product_Price") %>'></asp:Label>
                                            
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <EditRowStyle BackColor="#999999" />
                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                            </asp:GridView>
                            </asp:Panel>
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                    </tr>
                </table>
              
                </asp:Panel>
                    <cc1:ModalPopupExtender ID="MPE_CGL_POPU" runat="server" TargetControlID="btnHidden2"
                        PopupControlID="pnl_CGLProdt_list" PopupDragHandleControlID="PopupHeader" BackgroundCssClass="modalBackground"
                        OkControlID="btnHidden2" CancelControlID="img_btn_Close" Drag="true">
                    </cc1:ModalPopupExtender>
                    <asp:Button ID="btnHidden2" runat="Server" Style="display: none" />
                </ContentTemplate>
            </asp:UpdatePanel>
    
            <asp:UpdateProgress ID="UpdateProgress1" DisplayAfter="10" runat="server" AssociatedUpdatePanelID="UPCL">
                <ProgressTemplate>
                    <div class="divWaiting">
                        <asp:Image ID="imgWait" runat="server" ImageAlign="Middle" ImageUrl="Images/progress_gifs/iph_wheel_blu_100px.gif" /></div>
                </ProgressTemplate>
                
            </asp:UpdateProgress>
            <div align="center" id="divFooter">
              
            </div>
            
            </form>

    Code behind 

    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
            If Session("Sv_ServerDate") Is Nothing Then Response.Redirect("login.aspx")
            If Not IsPostBack Then
                Txt_TxnPeriod_From.Attributes.Add("readonly", "readonly")
                Txt_TxnPeriod_To.Attributes.Add("readonly", "readonly")
                f_Tool.Get_CGL_Product_Details(1, Grv_CGL_Product_List)
            End If
        End Sub
    
    Protected Sub Grd_KYC_Txns_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles Grd_KYC_Txns.RowDataBound
    
            If e.Row.RowType = DataControlRowType.DataRow Then
                e.Row.Attributes.Add("onmouseover", "self.MouseOverOldColor=this.style.backgroundColor;this.style.backgroundColor='#C0C0C0'")
                e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=self.MouseOverOldColor")
            End If
        End Sub
        Protected Sub Rbt_CGL_products_CheckedChanged(sender As Object, e As System.EventArgs)
            For Each CGL_row As GridViewRow In Grd_KYC_Txns.Rows
                Dim CGL_Rbt As System.Web.UI.WebControls.RadioButton = CType(CGL_row.FindControl("Rbt_CGL_products"), System.Web.UI.WebControls.RadioButton)
                If CGL_Rbt.Checked = True Then
                    Lbl_MemberName.Text = CGL_row.Cells(3).Text
                    Lbl_LoanAmt.Text = CGL_row.Cells(7).Text
                    Call MPE_CGL_POPU.Show()
                End If
    
            Next
        End Sub

    Thursday, September 20, 2018 11:41 AM
  • User-893317190 posted

    Hi ayyappan.CNN ,

    It seems that you use my code and haven't changed it according to your gridview.

    My table's html structure is not the same as yours, so you should change it according to your own html.

    For example, in your case ,  code should be var row = $(this).parent().parent().parent(); instead of var row = $(this).parent().parent(); 

    And row.children(":eq(1)") represents the second child of the row,  eq(2) the third , eq(3) the fourth. My table only have three columns and yours have more columns, you should choose you wanted column according to the index of the column.

    You still write the code    $("#idt").html(idtSum.slice(0, idtSum.lastIndexOf(","))); $("#loan").html(loanAmtSum);, but I haven't find an element with the id idt or loan, have you added the two element?

    If you don't know how to change my code according to your aspx , I suggest you could refer to jquery official site and search the jquery method I have used in my code.

    https://api.jquery.com/

    In my  opinion,if you use javascript , the code will more complex .I really suggest you could use jquery.

    Below is my changed code. But still a little different from yours. You could use F12 developer tool to help you get the structure of your gridview and change your code accordint to the structure.

     <script src="Scripts/jquery-3.3.1.js"></script>
    
            <script type="text/javascript">
                $(function () {
    
                    $("#Grv_CGL_Product_List :checkbox").on('change', function () {
                      
                        var idtSum = "";
                        var loanAmtSum = 0;
                        $("#code").html("");
                        $("#Grv_CGL_Product_List :checkbox:checked").each(
                            function () {
                                var row = $(this).parent().parent().parent();
                                idtSum += row.children(":eq(1)").html().trim() + ",";
                                loanAmtSum += parseFloat(row.children(":eq(3)").find("span").html().trim());
                            }
    
                        )
    
                        $("#idt").html(idtSum.slice(0, idtSum.lastIndexOf(",")));
                        $("#loan").html(loanAmtSum);
                    })
    
    
                })
    
            </script>
    
    
    
    
    <form id="Form1" method="post" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
         IDTSum:  <span id="idt"></span>   &nbsp;&nbsp;&nbsp;&nbsp;  LoanAmtSum: <span id="loan"></span> &nbsp;&nbsp;&nbsp;&nbsp;
            ProductCode: <span id="code"></span>
    
            <asp:UpdatePanel ID="UPCL" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
             
                                                                                                  
                                                                        
                    <asp:Panel ID="Pnl_InNos" runat="server" Height="256px" Width="122px" BorderColor="#6666FF"
                BorderStyle="Solid" BorderWidth="1px">
                <table>
                <tr><td></td>
                <td>
                <asp:GridView ID="Grv_IWNos" runat="server" AutoGenerateColumns="False" CellPadding="4" 
                            CssClass="smalltext2" ForeColor="#333333" GridLines="Vertical">
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    <Columns>
                        <asp:BoundField DataField="HD" HeaderText="Code" />
                        <asp:BoundField DataField="PR_ID" HeaderText="IW NO" >
                        <ItemStyle ForeColor="#0000CC" />
                        </asp:BoundField>
                    </Columns>
                    <EditRowStyle BackColor="#999999" />
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#E9E7E2" />
                    <SortedAscendingHeaderStyle BackColor="#506C8C" />
                    <SortedDescendingCellStyle BackColor="#FFFDF8" />
                    <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                </asp:GridView>
                </td>
                </tr>
                </table>
            </asp:Panel>
            
    
            <asp:Panel id="pnl_CGLProdt_list" runat="server" Width="700px" Height="650px" BackColor="#9CAAC1">
             <table class="style95">
                    <tr>
                        <td>
                            &nbsp;</td>
                        <td>
                            <table class="style95">
                                <tr>
                                    <td class="style96">
                                        <asp:Label ID="Lbl_MemberName" runat="server"></asp:Label>
                                    </td>
                                    <td class="style97">
                                        <asp:Label ID="Lbl_LoanAmt" runat="server"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:Label ID="idt" runat="server"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:Label ID="loan" runat="server"></asp:Label>
                                    </td>
                                    <td><span id="code"></span>
                                        &nbsp;</td>
                                </tr>
                            </table>
                        </td>
                        <td rowspan="2" valign="top">
                            <asp:ImageButton ID="Img_Btn_Close" runat="server" Height="30px" 
                                ImageUrl="~/Images/UserConsole_ICO/CloseBtnPNG.png" Width="30px" />
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;</td>
                        <td>
                            <asp:Panel ID="Pnl_CGL_Pr_Gr2" runat="server" ScrollBars="Auto" Height="284px">
                            
    
    
                            <asp:GridView ID="Grv_CGL_Product_List" runat="server" 
                                AutoGenerateColumns="False" CellPadding="4" CssClass="smalltext Grid" 
                                ForeColor="#333333">
                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                <Columns>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="cbx_cgl" runat="server" CssClass="normalText2" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="IDT" HeaderText="IDT" />
                                    <asp:BoundField DataField="Productcode" HeaderText="Product Code" />
                           
                                    <asp:TemplateField HeaderText="Loan Amt.">
                                        <ItemTemplate>
                                            <asp:Label ID="lblValue" runat="server" Text='<%# Eval("LoanAmt") %>'></asp:Label>
                                            
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <EditRowStyle BackColor="#999999" />
                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                            </asp:GridView>
                            </asp:Panel>
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                    </tr>
                </table>
              
                </asp:Panel>
    
    
                  
    
                    <ajaxToolkit:ModalPopupExtender ID="MPE_CGL_POPU" runat="server" TargetControlID="btnHidden2"
                        PopupControlID="pnl_CGLProdt_list" PopupDragHandleControlID="PopupHeader" BackgroundCssClass="modalBackground"
                        CancelControlID="img_btn_Close" Drag="true">
                    </ajaxToolkit:ModalPopupExtender>
                    <asp:Button ID="btnHidden2" runat="Server"  Text="button" />
                </ContentTemplate>
            </asp:UpdatePanel>
    
           
    
           
            </form>
    </body>
    </html>
    

    Code behind.

     Private constr As String = ConfigurationManager.ConnectionStrings("userItem").ConnectionString
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Dim Sql As String = "select * from products"
            If Not IsPostBack Then
    
                Using adapter As SqlDataAdapter = New SqlDataAdapter(Sql, constr)
    
                    Dim table As DataTable = New DataTable()
                    adapter.Fill(table)
                    Grv_CGL_Product_List.DataSource = table
                    Grv_CGL_Product_List.DataBind()
                End Using
    
            End If
        End Sub
    

    And the result.

    Best regards,

    Ackerly Xu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 21, 2018 2:16 AM
  • User-582711651 posted

    Hi Ackerly Xu, 

    Thanks, you did a lot for me.

    I tried it works when I include ModalPopupExtender it does not work, after my continues research, I found a solution in Javascript it works well, pls refer my below Javascript ...

    (I have modified and updated, so the below final and corrected, works well with update panel & <g class="gr_ gr_25 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="25" data-gr-id="25">modalpopup</g> extender)

    <script type="text/javascript">  
    function chk_cglv2(cgl_prodx) {
                    if (cgl_prodx.checked == true) {
                        var l_value = 0;
                        var idt_cum = "";
    
                        var cg_gvx = document.getElementById('Grv_CGL_Product_List');
    
                        for (rxi = 1; rxi < cg_gvx.rows.length; rxi++) {
    
                            if (cg_gvx.rows[rxi].cells[0].getElementsByTagName('input')[0].checked == true) {
                                cg_gvx.rows[rxi].style.backgroundColor = 'yellow';
                                idt_cum += (cg_gvx.rows[rxi].cells[2].innerHTML).trim() + ",";
                                l_value += parseInt((cg_gvx.rows[rxi].cells[5].innerHTML).trim());
                            }
                        }
    
                        document.getElementById('idt').innerHTML = (idt_cum.slice(0, idt_cum.lastIndexOf(",")));
                        document.getElementById('loan').innerHTML = l_value;
    
                    }
                    else {
                        var l_value = 0;
                        var idt_cum = "";
    
                        var cg_gvx = document.getElementById('Grv_CGL_Product_List');
    
                        for (rxi = 1; rxi < cg_gvx.rows.length; rxi++) {
    
                            if (cg_gvx.rows[rxi].cells[0].getElementsByTagName('input')[0].checked == true) {
                                idt_cum += (cg_gvx.rows[rxi].cells[2].innerHTML).trim() + ",";
                                l_value += parseInt((cg_gvx.rows[rxi].cells[5].innerHTML).trim());
                            }
                        }
    
                        document.getElementById('idt').innerHTML = (idt_cum.slice(0, idt_cum.lastIndexOf(",")));
                        document.getElementById('loan').innerHTML = l_value;
                    }
                }
    </script>

    But possible pls share your inputs, after the <g class="gr_ gr_349 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="349" data-gr-id="349">modalpopup</g> extender implementation why that Jquery script not works?

    anyhow Thanks for your valuable support. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 21, 2018 6:02 PM