当前位置:编程学习 > 网站相关 >>

实例repeater 分页、表头不动、添加列序号

 前台代码:

<head runat="server">
    <title></title>
    <link href="css/IE.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
       .fixHeaderStyle
        { PADDING-RIGHT: 0px;
        PADDING-LEFT: 0px;
        FONT-WEIGHT: bold;
        FONT-SIZE: 12px;
        VERTICAL-ALIGN: middle;
        LINE-HEIGHT: 20px;
        FONT-FAMILY: "Arial" , "Helvetica" , "sans-serif";
        POSITION: relative;
        TOP: expression(this.offsetParent.scrollTop-2);
        Z-INDEX: 5 ; HEIGHT: 26px; BACKGROUND-COLOR: #f0f0e8;
        TEXT-ALIGN: center; TEXT-DECORATION: none;
        ext-transform: capitalize ;

        }
        .scrollColThead {position: relative;
top: expression(this.parentElement.parentElement
.parentElement.scrollTop);
z-index:2;}

        .hlink
        {
        height:25px;width:40px;color:Blue;font-size:15px;
            }

    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div >
        <asp:Repeater ID="Repeater1" runat="server"
            onitemdatabound="Repeater1_ItemDataBound">
        <HeaderTemplate>
        <div style="">
        <table width="340%" id="tblResult" bgcolor="CornflowerBlue"  cellpadding=1 cellspacing=1 >
       <%-- <tr style="position:relative; top:expression(this.offsetParent.scrollTop);">
--%>
        <tr  class = "fixHeaderStyle">
        <td class="clsHeader">NO.</td>
        <td class="clsHeader">Type</td>
        <td class="clsHeader">ETD Date</td>
        <td class="clsHeader">MB/L#</td>
        <td class="clsHeader"> HB/L#</td>
        <td class="clsHeader">Party Type</td>
        <td class="clsHeader">Code</td>
        <td class="clsHeader">Name</td>
        <td class="clsHeader">Curr</td>
<%--        <td class="clsHeader">A/R</td>
        <td class="clsHeader">A/P </td>--%>
        <td class="clsHeader">发票号</td>
        <td class="clsHeader">开票日期</td>
        <td class="clsHeader">JobID</td>
        <td class="clsHeader">开票人</td>
        <td class="clsHeader">Sales</td>
        <td class="clsHeader">R/O</td>
        <td class="clsHeader">核销单</td>
        <td class="clsHeader">Flight#/Date</td>
        <td class="clsHeader">ETA</td>
        <td class="clsHeader">Pay Terms</td>
        <td class="clsHeader">Agreement No.</td>
        <td class="clsHeader">No.</td>
        <td class="clsHeader">过账人</td>
        <td class="clsHeader">过账日期</td>
        <td class="clsHeader">过账凭证</td>
        <td class="clsHeader">记账人</td>
        <td class="clsHeader">记账日期</td>
        <td class="clsHeader">记账凭证</td>
        <td class="clsHeader">对账人</td>
        <td class="clsHeader">对账日期</td>
        <td class="clsHeader">对账凭证</td>
        <td class="clsHeader">签收人</td>
        <td class="clsHeader">签收日期</td>
        <td class="clsHeader">签收凭证</td>
        <td class="clsHeader">销账人</td>   

        <td class="clsHeader">销账日期</td>
        <td class="clsHeader">销账凭证</td>
        <td class="clsHeader">作废人</td>
        <td class="clsHeader">作废日期</td>
        <td class="clsHeader">LockBy</td>
        <td class="clsHeader">P/L No.</td>
        <td class="clsHeader">MANIFEST#</td>
        <td class="clsHeader">制单日期</td>
        <td class="clsHeader">制单人</td>
        </tr>
        </HeaderTemplate>
        <ItemTemplate>
        <tr style="background-color:White;">

补充:综合编程 , 其他综合 ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,