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

  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. 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. =?Utf-8?B?U3VyZXNo?=
    Replies:
    0
    Views:
    527
    =?Utf-8?B?U3VyZXNo?=
    Mar 2, 2004
  2. Brian K. Williams
    Replies:
    0
    Views:
    547
    Brian K. Williams
    Mar 2, 2004
  3. =?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:
    416
    =?Utf-8?B?TW8=?=
    May 10, 2004
  4. micky

    default.mspx or default.do

    micky, Dec 16, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    498
    Andrew Robinson
    Dec 17, 2005
  5. 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:
    227
    Elton Wang
    Jul 21, 2005
Loading...

Share This Page