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>
Repeater 和 GridView 添加序列号的更多相关文章
- ASP.NET 为GridView添加序号列,且支持分页连续累计显示
为GridView添加序号列,且支持分页连续累计显示,废话不多说,直接上代码: <%@ Page Language="C#" AutoEventWireup="tr ...
- Android GridView 添加 网格线解决办法
在使用 GridView 网格布局时,默认情况下 GridView 是没有网格线的,但是有些时候我们需要让GridView显示分割线,怎么办呢?查了不少资料,找到了一种为GridView添加网格线的 ...
- Repeater控件添加序号列
在项目开发过程中,会经常遇到ASP.NET repeater控件添加序号列,有些新手可能还不会,网上搜集整理了一些,需要的朋友可以参考下 ASP.NET repeater添加序号列的方法 1.< ...
- 自己写的一个ASP.NET服务器控件Repeater和GridView分页类
不墨迹,直接上代码 using System; using System.Collections.Generic; using System.Linq; using System.Text; usin ...
- Repeater和Gridview前台显示行号的方法
Repeater : Container.ItemIndex (行号从零开始,如果想改为从1开始,那么可以将以上的代码改为Container.ItemIndex + 1),见下示例: <asp: ...
- gridview添加header
gridview是不能添加header的,这里的解决方法是将listview改造成gridview使用,功能很好用,唯一的缺点是列数不能自适应 示例代码下载地址http://pan.baidu.com ...
- Repeater嵌套gridview
前台:<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSour ...
- asp.net 中Repeater和Gridview的区别
Griview: 优点:1.GridView是从WebControl派生出来的,拥有WebControl样式属性,自身会被解析为table,其中的每一行会被 ...
- Repeater控件添加onmouseover和onmouseout事件
网友有问题,在Repeater控件中,需要添加onmouseover和onmouseout事件功能.Insus.NET有叫他参考<onmouseover和onmouseout在Repeater控 ...
随机推荐
- android菜鸟学习笔记1----环境搭建
Step1 JDK安装及配置: 1.下载并安装JDK: 根据自己系统情况,选择安装相应的JDK版本 当前系统:64位WIN8,内存8G 选择了Java SE 8u45 即JDK 1.8.0_45,可以 ...
- Android实现下拉导航选择菜单效果
本文介绍在Android中如何实现下拉导航选择菜单效果. 关于下拉导航选择菜单效果在新闻客户端中用的比较多,当然也可以用在其他的项目中,这样可以很方便的选择更多的菜单.我们可以让我们的应用顶部有左 ...
- win7计划任务定时执行PHP脚本设置图解
做php开发的朋友有时候会希望自己的电脑能每天定时的运行一下某个脚本,但定时执行php脚本这种概念似乎多半是在linux中才提到,下面这篇文章主要和大家分享一下在win7下如何设置计划任务,以实现定时 ...
- 添加@ControllerAdvice后报错 Failed to invoke @ExceptionHandler method
首先.单独使用ControllerAdvice 无法正常工作.需要配合@EnableWebMvc 使用. @ControllerAdvice @EnableWebMvc pulbic class Ex ...
- IOS平台的几个推送服务的对比
http://blog.163.com/scuqifuguang@126/blog/static/171370086201399113833299/ 最近研究了一下极光推送(JPush) ...
- iOS 多语言支持
如果app将来面向国际化,比如说中国需要使用,美国也需要使用,此时就需要考虑app支持多国语言 具体方式如下 首先在Supporting Files中新建 Strings 起名: Localizabl ...
- php中一些比常见做法更好的实践
有些被我们习以为常的做法未必就是最好的,它们可能存在一些安全问题,而解决这些隐患的成本,其实并不高: 密码 常见做法是直接MD5进行加密,比如这样: //加密 $passwordStr = md5($ ...
- 使用valgrind进行内存泄漏和非法内存操作检测
valgrind是一个强大的工具,最常用的功能是用它来检测内存泄漏和非法内存的使用.要想让valgrind报告的更加细致,请使用-g进行编译. 基本命令如下: $ valgrind --tool=me ...
- 自动增量更新war包的shell脚本
我们项目是打包成war部署在jboss中的,但在上线或者运行时,经常要修改某些类然后再增量更新到war(因为生产环境只有发布的同时有,不能每个人都打包),所以都是手动做的,耗时耗力. 我花了点时间写了 ...
- IP服务-计算机网络
如需转载请联系:fengxw6@mail2.sysu.edu.cn 未经许可,禁止转载,私人笔记,码字不易,望理解. ---Sun Yat-sen University 冯兴伟 本节主要就讲网络层的各 ...