ASP.Net2.0 GridView 多列排序,显示排序图标,分页(7)
点击次数:25 次 发布日期:2008-11-26 12:15:04 作者:源代码网
|
源代码网推荐 189 } 源代码网推荐 190 else 源代码网推荐 191 { 源代码网推荐 192 源代码网推荐 193 if (AllowMultiColumnSorting) 源代码网推荐 194 { 源代码网推荐 195 Literal litSortSeq = new Literal(); 源代码网推荐 196 litSortSeq.Text = sortOrderNo.ToString(); 源代码网推荐 197 dgItem.Cells[i].Controls.Add(litSortSeq); 源代码网推荐 198 源代码网推荐 199 } 源代码网推荐 200 } 源代码网推荐 201 } 源代码网推荐 202 } 源代码网推荐 203 } 源代码网推荐 204 源代码网推荐 205 } 源代码网推荐 206 #endregion 源代码网推荐 207 } 源代码网推荐 第二:详尽的分页信息显示,此功能没有封装成控件形式,直接在GridView_DataBound事件中对尾页操作即可。 源代码网推荐 下面是多列排序与分页显示代码的演示 源代码网推荐 源代码网推荐 源代码网推荐 <script runat="server"> 源代码网推荐 void PageDropDownList_SelectedIndexChanged(Object sender, EventArgs e) 源代码网推荐 { 源代码网推荐 GridViewRow pagerRow = CustomersGridView.BottomPagerRow; 源代码网推荐 DropDownList pageList = (DropDownList)pagerRow.Cells[0].FindControl("PageDropDownList"); 源代码网推荐 CustomersGridView.PageIndex = pageList.SelectedIndex; 源代码网推荐 } 源代码网推荐 void CustomersGridView_DataBound(Object sender, EventArgs e) 源代码网推荐 { 源代码网推荐 GridViewRow pagerRow = CustomersGridView.BottomPagerRow; 源代码网推荐 源代码网推荐 源代码网推荐 源代码网推荐 做人要厚道,请注明转自酷网动力(www.ASPCOOL.COM)。 源代码网推荐 源代码网供稿. |
