GridView技巧1:加入序号

 

<asp:TemplateField HeaderText="序号" InsertVisible="False" SortExpression="LessonID">
 <ItemTemplate>
     <asp:Label ID="Label2" runat="server"  
      Text='<%# this.GridView1.PageIndex * this.GridView1.PageSize 
                        + this.GridView1.Rows.Count + 1
%>'  >
      </asp:Label>
</ItemTemplate>
</asp:TemplateField>
posted on 2006-10-13 09:20  灵风  阅读(2174)  评论(5编辑  收藏  举报