ASP.Net2.0 GridView 多列排序,显示排序图标,分页(9)
点击次数:32 次 发布日期:2008-11-26 12:15:01 作者:源代码网
|
源代码网推荐 pageList.Items.Add(item); 源代码网推荐 源代码网推荐 } 源代码网推荐 源代码网推荐 } 源代码网推荐 if (pageLabel != null) 源代码网推荐 { 源代码网推荐 int currentPage = CustomersGridView.PageIndex + 1; 源代码网推荐 pageLabel.Text = "当前页: " + currentPage.ToString() + 源代码网推荐 " / " + CustomersGridView.PageCount.ToString(); 源代码网推荐 } 源代码网推荐 } 源代码网推荐 源代码网推荐 </script> 源代码网推荐 源代码网推荐 <html> 源代码网推荐 <body> 源代码网推荐 <form id="Form1" runat="server"> 源代码网推荐 <h3> 源代码网推荐 GridView PagerTemplate Example</h3> 源代码网推荐 <asp:WebGridView ID="CustomersGridView" DataSourceID="CustomersSqlDataSource" AutoGenerateColumns="true" 源代码网推荐 AllowPaging="true" OnDataBound="CustomersGridView_DataBound" SortAscImageUrl="~imagesarrow-up.gif" SortDescImageUrl="~imagesarrow-down.gif" runat="server" AllowSorting="True" Width="723px"> 源代码网推荐 <PagerStyle ForeColor="Blue" BackColor="LightBlue" /> 源代码网推荐 <PagerTemplate> 源代码网推荐 <table width="100%"> 源代码网推荐 <tr> 源代码网推荐 <td width="70%"> 源代码网推荐 <asp:Label ID="MessageLabel" ForeColor="Blue" Text="页码:" runat="server" /> 源代码网推荐 <asp:DropDownList ID="PageDropDownList" AutoPostBack="true" OnSelectedIndexChanged="PageDropDownList_SelectedIndexChanged" 源代码网推荐 runat="server" /> 源代码网推荐 <asp:LinkButton CommandName="Page" CommandArgument="First" ID="linkBtnFirst" runat="server">首页</asp:LinkButton> 源代码网推荐 源代码网推荐 源代码网推荐 源代码网推荐 做人要厚道,请注明转自酷网动力(www.ASPCOOL.COM)。 源代码网推荐 源代码网供稿. |
