1
我正在尝试将分页添加到我的Gridview。我已经添加了以下的特性:对asp:DataGrid分页不起作用
<table id="myTable" class="table tbody" runat="server" visible="false">
<tbody>
<tr>
<td>
<asp:DataGrid ID="myGrid" runat="server" CssClass="table table-striped tbody" Visible="false"
AutoGenerateColumns="True"
AllowPaging="True"
AllowCustomPaging="true"
ForeColor="black"
HeaderStyle-Font-Bold="true"
HeaderStyle-ForeColor="black"
GridLines="None"
EnableViewState="false" />
</td>
</tr>
</tbody>
</table>
结果集返回22行,这是正确显示第一页上的第10位,但我没有任何选择移动到下一个页面。有没有数字或箭头按下移动到第2页等
任何人都可以帮助我,我做错了什么?
我的viewstate会是什么? – Code
任何你想命名它。然后调用相同的视图状态名称从中提取数据。我使用ViewState来最小化在页面生命周期中需要做的数据库调用次数。 – JustLearning