GridView Control

Discussion in 'ASP .Net Web Controls' started by Machi, May 12, 2005.

  1. Machi

    Machi Guest

    I am very new to ASP.NET 2.0. I tried to use GridView control and its
    built-in SqlDataSource object. Where there is data for a particular table
    which i bind my GridView to, the GridView can show successfully. However,
    when there is no record in my table which i bind my GridView to, the whole
    GridView will not be displayed. May i know how to make my GridView just
    displays the header text when there is no record in my table?Thanks.
    Machi, May 12, 2005
    #1
    1. Advertising

  2. Machi

    Brock Allen Guest

    There is a <EmptyDataTemplate> you can specify for when there are now rows
    to be shown. I usually put something like "No Rows Returned" or somesuch.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen



    > I am very new to ASP.NET 2.0. I tried to use GridView control and its
    > built-in SqlDataSource object. Where there is data for a particular
    > table which i bind my GridView to, the GridView can show successfully.
    > However, when there is no record in my table which i bind my GridView
    > to, the whole GridView will not be displayed. May i know how to make
    > my GridView just displays the header text when there is no record in
    > my table?Thanks.
    >
    Brock Allen, May 12, 2005
    #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. ABC
    Replies:
    1
    Views:
    2,623
    Larry
    Oct 4, 2005
  2. ABC
    Replies:
    0
    Views:
    1,859
  3. ABC
    Replies:
    0
    Views:
    470
  4. mz
    Replies:
    0
    Views:
    641
  5. =?Utf-8?B?bWdvbnphbGVzMw==?=

    GridView Hierarchical View - Gridview in Gridview

    =?Utf-8?B?bWdvbnphbGVzMw==?=, May 9, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    17,944
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    May 9, 2006
Loading...

Share This Page