Default display for a Datagrid

Discussion in 'ASP .Net' started by Kenneth Keeley, Dec 14, 2004.

  1. Hi,
    Can I configure what a datagrid will look like if no results are found
    for it to bind to. I would like it to say something like "No Results Found
    please try again." All I get at the moment is a blank datagrid with the
    heads all showing and no results.

    Thanks
    Kenneth
     
    Kenneth Keeley, Dec 14, 2004
    #1
    1. Advertisements

  2. Check your datasource to see if it has any rows.
    If it has no rows, make the datagrid invisible, and make a label or
    something else visible that displays an appropriate message.

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://Steve.Orr.net


    "Kenneth Keeley" <> wrote in message
    news:%...
    > Hi,
    > Can I configure what a datagrid will look like if no results are found
    > for it to bind to. I would like it to say something like "No Results Found
    > please try again." All I get at the moment is a blank datagrid with the
    > heads all showing and no results.
    >
    > Thanks
    > Kenneth
    >
    >
     
    Steve C. Orr [MVP, MCSD], Dec 14, 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. =?Utf-8?B?QmluIFNvbmcsIE1DUA==?=

    RE: Datagrid wont display records by default

    =?Utf-8?B?QmluIFNvbmcsIE1DUA==?=, May 10, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    501
    =?Utf-8?B?TW8=?=
    May 10, 2004
  2. micky

    default.mspx or default.do

    micky, Dec 16, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    687
    Andrew Robinson
    Dec 17, 2005
  3. Gaetan
    Replies:
    3
    Views:
    1,689
    Juan T. Llibre
    Feb 14, 2006
  4. C Gillespie
    Replies:
    3
    Views:
    589
    Peter Hansen
    Mar 22, 2005
  5. Max
    Replies:
    2
    Views:
    644
    Joe Kesselman
    Aug 1, 2006
  6. desktop
    Replies:
    2
    Views:
    657
    Victor Bazarov
    Jun 6, 2007
  7. puzzlecracker
    Replies:
    8
    Views:
    648
    James Kanze
    Apr 15, 2008
  8. Paul D. Fox

    Display a Datagrid & Export a Datagrid to Excel

    Paul D. Fox, Jul 21, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    373
    Elton Wang
    Jul 21, 2005
Loading...