OnPreRender
事件:<asp:GridView ID="gv1" OnPreRender="GridView1_PreRender" runat="server">
in code-behind:
Protected Sub gv1_PreRender(ByVal sender As Object, ByVal e As EventArgs)
Dim pagerRow As GridViewRow = GridView1.BottomPagerRow
If pagerRow IsNot Nothing AndAlso pagerRow.Visible = False Then
pagerRow.Visible = True
End If
End Sub
or:
Protected Sub GridView1_PreRender(ByVal sender As Object, ByVal e As EventArgs) gv1.BottomPagerRow.Visible = True End Sub
來源: http://stackoverflow.com/questions/1057114/forcing-asp-net-gridviews-pager-to-show