Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Don't show Numeric page number on Datagrid if one page

Status
Not open for further replies.

ksbigfoot

Programmer
Apr 15, 2002
856
CA
I set my Datagrid to
Code:
PagerStyle-Visible="True" 
PagerStyle-Mode="NumericPages"
The grid is to show 10 records at a time.
If I have only 9 records being displayed, is there a way to not show 1 as the page number?
 
I think I figured it out.
Code:
If CType(.PageCount, Int32) < 11 Then
    .PagerStyle.Visible = False
End If
 
Sorry, Replaced a variable with a number.
The code should be

Code:
If CType(.PageCount, Int32) < 2 Then
    .PagerStyle.Visible = False
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top