HIDE paging controls in datagrid**

Discussion in 'ASP .Net' started by Kruno, Apr 23, 2004.

  1. Kruno

    Kruno Guest

    I want to hide paging controls in Datagrid if
    there is nothing to page...If there is nothing to
    page datagrid still shows them (?!)

    how can I do that??
     
    Kruno, Apr 23, 2004
    #1
    1. Advertisements

  2. Hey Kruno,

    How about hiding it if there's one or no pages?

    DataGrid1.DataBind()
    DataGrid1.PagerStyle.Visible = _
    Not (DataGrid1.PageCount < 2)

    Does this help?

    Ken
    Microsoft MVP [ASP.NET]
    Toronto

    "Kruno" <> wrote in message
    news:...
    >I want to hide paging controls in Datagrid if
    > there is nothing to page...If there is nothing to
    > page datagrid still shows them (?!)
    >
    > how can I do that??
    >
    >
     
    Ken Cox [Microsoft MVP], Apr 23, 2004
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guadala Harry

    Paging in Controls Other Than DataGrid

    Guadala Harry, Feb 26, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    359
    John Morgan
    Feb 28, 2004
  2. Roger
    Replies:
    0
    Views:
    1,084
    Roger
    Dec 28, 2004
  3. wh1974
    Replies:
    0
    Views:
    2,731
    wh1974
    Jan 12, 2005
  4. Red
    Replies:
    1
    Views:
    906
  5. Green Start Button

    DataGrid.Items.Count and DataGrid Paging...

    Green Start Button, Aug 4, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    6,084
    agravar
    Aug 2, 2006
  6. Jason
    Replies:
    0
    Views:
    399
    Jason
    Oct 4, 2006
  7. Kruno

    HIDE paging controls in datagrid**

    Kruno, Apr 23, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    177
    Ken Cox [Microsoft MVP]
    Apr 23, 2004
  8. DataGrid Paging Controls

    DataGrid Paging Controls

    DataGrid Paging Controls, Sep 15, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    135
    DataGrid Paging Controls
    Sep 15, 2005
Loading...