how did you bind the data? post your code or play with
<%@Import Namespace="system.data"%>
<%@Import Namespace="system.data.sqlclient"%>
<html>
<form runat="server">
<asp:datagrid id="dg" runat="server" allowpaging="true" pagesize="5" autogeneratecolumns="true" 
onpageindexchanged="pagechanged"
AllowCustomPaging="true"
PagerStyle-Mode="NumericPages"
/>
</form>
</html>
<script language="vb" runat="server">
        dim strconn as string="server=localhost;database=northwind;uid=sa;password=;"
Sub SetItemCount()
dim conn as new sqlconnection(strconn)
conn.open
dim strsql as string="select count(*) from customers"
dim cmd as new sqlcommand(strsql,conn)
dg.VirtualItemCount = cmd.ExecuteScalar()
conn.close
end Sub        sub binddata(nPage as Integer)
dim nTopCount as Integer = (nPage+1) * dg.PageSize dim conn as new sqlconnection(strconn)
conn.open
dim strsql as string= "select * from (select top " & dg.PageSize & " * from ( select top " & nTopCount & " * from customers order by CustomerID ) t order by CustomerID  desc) t2 order by CustomerID" 
dim cmd as new sqlcommand(strsql,conn)
dg.datasource=cmd.executereader()
dg.databind()
conn.close
        end sub Sub page_load(sender as object,e as eventargs)
   if not ispostback then
SetItemCount()
binddata(0)
  end if
End sub

Sub pagechanged(sender as object,e as datagridpagechangedeventargs)
dg.currentpageindex=e.newpageindex
binddata(dg.currentpageindex)
End sub
</script>