下面是DataGrid的代码:<asp:DataGrid id="dgResult" runat="server" BorderColor="#999999" BorderStyle="None"
                  BorderWidth="1px" BackColor="White" CellPadding="3" PageSize="20" AllowPaging="True" GridLines="Vertical" AutoGenerateColumns="False" Font-Size="Small" AllowSorting="True" AllowCustomPaging="True">
                  <FooterStyle ForeColor="Black" BackColor="#CCCCCC"></FooterStyle>
                  <SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#008A8C"></SelectedItemStyle>
                  <ItemStyle ForeColor="Black" BackColor="#EEEEEE"></ItemStyle>
                  <HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#000084"></HeaderStyle>
                  <Columns>
                   <asp:TemplateColumn HeaderText="选择">
                    <ItemTemplate>
                     <asp:CheckBox Runat="server" Enabled="True" ID="ck"></asp:CheckBox>
                    </ItemTemplate>
                       <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                           Font-Underline="False" HorizontalAlign="Center" />
                   </asp:TemplateColumn>
                    <asp:BoundColumn DataField="JCBH" HeaderText="教材编号">
                        <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" HorizontalAlign="Center" />
                    </asp:BoundColumn>
                  <asp:BoundColumn DataField="JCMC" HeaderText="教材名称">
                      <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                          Font-Underline="False" HorizontalAlign="Center" />
                  </asp:BoundColumn>
                  <asp:BoundColumn DataField="CBS" HeaderText="出版社">
                      <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                          Font-Underline="False" HorizontalAlign="Center" />
                  </asp:BoundColumn>
                  <asp:BoundColumn DataField="ZZ" HeaderText="作者">
                      <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                          Font-Underline="False" HorizontalAlign="Center" />
                  </asp:BoundColumn>
                  <asp:BoundColumn DataField="DJ" HeaderText="单价">
                      <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                          Font-Underline="False" HorizontalAlign="Center" />
                  </asp:BoundColumn>
                  <asp:BoundColumn DataField="CBSJ" HeaderText="出版时间">
                      <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                          Font-Underline="False" HorizontalAlign="Center" />
                  </asp:BoundColumn>
                  <asp:BoundColumn DataField="BB" HeaderText="版本">
                      <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                          Font-Underline="False" HorizontalAlign="Center" />
                  </asp:BoundColumn>
                  <asp:BoundColumn DataField="JCLX" HeaderText="教材类型">
                      <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                          Font-Underline="False" HorizontalAlign="Center" />
                  </asp:BoundColumn>
                  <asp:BoundColumn DataField="SYDX" HeaderText="使用对象">
                      <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                          Font-Underline="False" HorizontalAlign="Center" />
                  </asp:BoundColumn>
                  <asp:BoundColumn DataField="HJQK" HeaderText="获奖情况">
                      <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                          Font-Underline="False" HorizontalAlign="Center" />
                  </asp:BoundColumn>
                  <asp:BoundColumn DataField="SFTJ" HeaderText="是否推荐">
                      <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                          Font-Underline="False" HorizontalAlign="Center" />
                  </asp:BoundColumn>
                  </Columns>
                  <PagerStyle HorizontalAlign="Right" ForeColor="Black" Mode="NumericPages" BackColor="LightSteelBlue"></PagerStyle>
            <AlternatingItemStyle BackColor="Gainsboro" />
        </asp:DataGrid>后台:
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        dbs = "F:\教材科项目\JCGL2007\App_Data\jcjbxx.mdb"
        con = New Data.OleDb.OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=" & dbs)
        con.Open()        sqls = "Select * From JCJBXX"
        icom = New Data.OleDb.OleDbCommand(sqls, con)
        dr = icom.ExecuteReader()
        dgResult.DataSource = dr        If Page.IsPostBack = False Then
            dgResult.DataBind()
        End If        icom = Nothing
        dr = Nothing        sqls = "Select * From JCJBXX"
        icom = New Data.OleDb.OleDbCommand(sqls, con)
        dr = icom.ExecuteReader()
        Dim i As Integer
        i = 0
        Try
            While dr.Read
                i = i + 1
            End While
        Catch ex As Exception        End Try
        intJLSL = i
        lblNum.Text = "(" & Str(intJLSL) & "条)"
    End Sub以前把DataGrid的DataSource属性设为一个AccessDataSource都可以自动分页,后来用DataBind就只能显示第一页了,怎么回事呢?是不是还要写点代码?还是DataGrid的属性没有设置正确?