zoukankan      html  css  js  c++  java
  • Repeater 和 GridView 添加序列号

     <tr><asp:Repeater ID="rptOfBrowerInfo" runat="server" >
        <HeaderTemplate>
        <table width="85%" border="0" cellspacing="0" cellpadding="0" class="msgtable" align="center" >
        <tr>
        <th>序号</th>
        <th>姓名</th>
        <th>身份证号</th>
         <th>抵押信息</th>
          <th>贷款金额</th>
           <th>目前剩余贷款</th>
           <th>本次转让债权价值</th>
           <th>须支付对价</th>
           <th>借款用途</th>
           <th>还款日期</th>
           <th>预计债权收益率(年)</th>
        </tr>
        </HeaderTemplate>
        <ItemTemplate>
        <tr >
         <td>

    <%#

    this.rptOfBrowerInfo.Items.Count

    +

    1%>
        <td><asp:Label ID="lblName" runat="server" Text=<%#Eval("CustomerName") %>></asp:Label></td>
        <td><asp:Label ID="lblNO" runat="server" Text=<%#Eval("IdNumber") %>></asp:Label></td>
        <td id="PrimayKey"><asp:Label ID="lblDiYa" runat="server" Text=<%#Eval("MortgageDetail") %>></asp:Label></td>
        <td><asp:Literal ID="lblLoan" runat="server" Text=<%#Eval("LoanMoney") %>></asp:Literal></td>
        <td><asp:Label ID="lblThisRemainMoney" data=<%#Eval("RemainMoney") %> runat="server" Text=<%#Eval("RemainMoney") %>></asp:Label></td>
        <td ><asp:Label runat="server" Id="zhaiquan" Text=<%#Eval("BorrowMoney") %> /></td>
        <td><asp:Label ID="test" runat="server" Text=<%#Eval("BorrowMoney") %> ></asp:Label></td>
        <td><asp:Label ID="lblUseBorrow" Text=<%#Eval("UseBorrow") %> runat="server"></asp:Label></td>
        <td><asp:Label ID="lblBackDate" Text=<%#Eval("BackDate") %> runat="server"></asp:Label></td>
        <td><asp:Label ID="lblYieldMoney" Text=<%#Eval("YieldMoney") %> runat="server"></asp:Label></td>
        </tr>
        </ItemTemplate>
        <FooterTemplate>
        </table>
        </FooterTemplate>
        </asp:Repeater>

      <asp:GridView ID="HT_LoanInformationGrid" runat="server" BorderWidth="0px"
               GridLines="None" ShowFooter="true"  CssClass="msgtable"
                          Width="100%" AutoGenerateColumns="False"
                        OnRowDeleting="HT_LoanInformationGrid_RowDeleting"
               onrowdatabound="HT_LoanInformationGrid_RowDataBound"   >
                        <RowStyle HorizontalAlign="Center" />
                        <Columns>
                         <asp:TemplateField HeaderText="序号" InsertVisible="False">
                  <ItemStyle HorizontalAlign="Center" />
                  <HeaderStyle HorizontalAlign="Center" Width="5%" />
                 <ItemTemplate>
                  <%#Container.DataItemIndex+1%>
                </ItemTemplate>
                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="姓名">
                                                    <ItemTemplate>
                                                     <%# Eval("CustomerName")%>
                                                    </ItemTemplate>
                                                    </asp:TemplateField>
                                                <asp:BoundField DataField="IdNumber" HeaderText="证件号">
                                                                                <HeaderStyle/>
                                                        <ItemStyle HorizontalAlign="Center" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="MortgageDetail" HeaderText="抵押信息">
                                                                                <HeaderStyle/>
                                                        <ItemStyle HorizontalAlign="Center" />
                                                </asp:BoundField>

                                                <asp:BoundField DataField="LoanMoney" HeaderText="贷款金额" >
                                                                                <HeaderStyle/>
                                                        <ItemStyle HorizontalAlign="Center" />
                                                </asp:BoundField>
                                                 <asp:TemplateField HeaderText="剩余贷款">
                                                     <ItemTemplate>
                                                     <%# string.Format("{0:f2}",Eval("RemainMoney"))%>
                                                    </ItemTemplate>
                                                    <FooterTemplate>
                                                    合计
                                                    </FooterTemplate>
                                                    </asp:TemplateField >
                                                 <asp:TemplateField HeaderText="转让债权价值" >
                                                     <ItemTemplate>
                                                     <%# string.Format("{0:f2}",Eval("BorrowMoney"))%>
                                                    </ItemTemplate>
                                                    <FooterTemplate>
                                                    <asp:Label ID="lblOfTransferValue" runat="server"></asp:Label>
                                                    </FooterTemplate>
                                                    </asp:TemplateField >
                                                    <asp:TemplateField HeaderText="支付对价">
                                                     <ItemTemplate>
                                                      <%# string.Format("{0:f2}", Eval("BorrowMoney"))%>
                                                    </ItemTemplate>
                                                    <FooterTemplate>
                                                    <asp:Label ID="lblOfPayPrice" runat="server"></asp:Label>
                                                    </FooterTemplate>
                                                    </asp:TemplateField >
                                                <asp:BoundField DataField="UseBorrow" HeaderText="借款用途">
                                                                                <HeaderStyle/>
                                                        <ItemStyle HorizontalAlign="Center" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="BackDate" HeaderText="还款日期">
                                                                                <HeaderStyle/>
                                                        <ItemStyle HorizontalAlign="Center" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="YieldMoney" HeaderText="债权收益率">
                                                                                <HeaderStyle/>
                                                        <ItemStyle HorizontalAlign="Center" />
                                                </asp:BoundField>
                        <asp:TemplateField HeaderText="删除">
                            <ItemStyle Width="60px"   />
                            <HeaderStyle  />
                            <ItemTemplate>
                                <asp:Image ID="Image2" runat="server" Height="9px" ImageUrl="~/images/010.gif" Width="9px" />
                                <asp:LinkButton ID="Delete" runat="server" CommandName="Delete" OnClientClick="javascript:return confirm('您确定要删除吗');">删除</asp:LinkButton>
                            </ItemTemplate>
                            <FooterTemplate>
                                 <span style="cursor:pointer;color: blue;" onclick="javascript:window.open ('HT_ModifiCationLoan.aspx?flag=1&lendnum=<% =Request.QueryString["LendNum"] %>','_self','');">新增</span>
                                </FooterTemplate>
                        </asp:TemplateField>
                        </Columns>
                        <HeaderStyle CssClass="bg2" HorizontalAlign="Center" />
                    </asp:GridView>

  • 相关阅读:
    Delphi 的RTTI机制浅探<二>
    Delphi 的RTTI机制浅探<一>
    delphi组件读写机制
    KeyDown和KeyPress的区别
    控件的安装和卸载方法
    delphi相关文件扩展名
    公用体
    主窗体和继承窗体
    计算机基础
    什么是base64?
  • 原文地址:https://www.cnblogs.com/haofaner/p/3630325.html
Copyright © 2011-2022 走看看