前期我们分别介绍了gridview怎么进行固定表多行数据显示,以及怎么设计花样表头。下面我们介绍怎么利用gridview进行分页显示的同时还可以进行排序显示。
显示效果
前端DEMO
<span style="font-family:Microsoft YaHei;font-size:18px;"><html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Gridview Page</title>
<link href="~/CSS/Gridview.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div id="container">
<asp:GridView ID="GridView1" ShowFooter="false" BorderColor="Black" OnRowDataBound="GridView1_RowDataBound" runat="server" AutoGenerateColumns="False" Font-Size="12px" Width="549px" AllowPaging="True" OnSorting="GridView1_Sorting" AllowSorting="True" >
<Columns>
<asp:BoundField DataField="ID" HeaderText="编号"/>
<asp:BoundField DataField=