我有一个
DataGrid
,带有属性AutoGenerateColumns="true"
和两个额外的列(查看和更新)。我向其中添加了分页,但分页仅在第一列下。它工作正常,但是DataGrid
的外观对我来说并不好。我不想绑定每一列。如何将分页作为一整行
<asp:DataGrid ID="DataGrid1" runat="server" AllowPaging="true" AutoGenerateColumns="true" OnItemDataBound="DataGrid1_ItemDataBound" UseAccessibleHeader="true"
CssClass="table table-striped table-bordered table-hover dataTable"
PageSize="2" OnPageIndexChanged="DataGrid1_PageIndexChanged">
<PagerStyle Font-Italic="True" Mode="NumericPages" HorizontalAlign="Right"></PagerStyle>
</asp:DataGrid>