Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > GridView Control

Reply
Thread Tools

GridView Control

 
 
Machi
Guest
Posts: n/a
 
      05-12-2005
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.
 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      05-12-2005
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.
>




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GridView Hierarchical View - Gridview in Gridview =?Utf-8?B?bWdvbnphbGVzMw==?= ASP .Net 1 05-09-2006 06:48 PM
GridView control - getting the datafield name in a BoundField control mz ASP .Net 0 03-26-2006 03:07 PM
Web User Control with GridView can derive new Web User Control? ABC ASP .Net 1 10-04-2005 12:29 PM
Web User Control with GridView can derive new Web User Control? ABC ASP .Net 0 10-03-2005 10:23 AM
How to custom gridview control if it derive from web user control? ABC ASP .Net 0 10-03-2005 10:22 AM



Advertisments