Empty GridView

Discussion in 'ASP .Net Web Controls' started by Jim McGivney, Aug 29, 2007.

  1. Jim McGivney

    Jim McGivney Guest

    At times I display a page where there is no data for the GridView. The
    GridView is not displayed. In this case I would like to display a message
    such as "No data meets search criteria".
    How do I detect an empty GridView ?
    Thanks,
    Jim
    Jim McGivney, Aug 29, 2007
    #1
    1. Advertising

  2. Jim,

    take a look at the EmptyDataTemplate and EmptyDataText properties of the
    gridview.

    --

    Andrew Robinson
    http://blog.binaryocean.com
    http://www.bellinghamdotnet.org


    "Jim McGivney" <> wrote in message
    news:...
    > At times I display a page where there is no data for the GridView. The
    > GridView is not displayed. In this case I would like to display a message
    > such as "No data meets search criteria".
    > How do I detect an empty GridView ?
    > Thanks,
    > Jim
    >
    Andrew Robinson, Aug 29, 2007
    #2
    1. Advertising

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. John

    empty/non-empty element

    John, Jul 15, 2003, in forum: XML
    Replies:
    1
    Views:
    1,009
    Klaus Johannes Rusch
    Jul 16, 2003
  2. Lukas
    Replies:
    3
    Views:
    783
    spiff
    Nov 10, 2005
  3. Marcia Hon

    Check if a directory is empty and empty it

    Marcia Hon, Feb 8, 2004, in forum: C Programming
    Replies:
    8
    Views:
    562
    Dave Thompson
    Feb 14, 2004
  4. Brian Roberts

    empty lists vs empty generators

    Brian Roberts, May 3, 2005, in forum: Python
    Replies:
    12
    Views:
    640
    Jeremy Bowers
    May 4, 2005
  5. Savvoulidis Iordanis

    Empty gridview cells and checking for empty string

    Savvoulidis Iordanis, Sep 5, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    506
    Savvoulidis Iordanis
    Sep 5, 2008
Loading...

Share This Page