Showing the column headers of a GridView when there is no data

H

Hans Merkl

Hi,

Is there a way to show the column headers of a GridView control even if
there is no data? The only thing I see is the EmptyDataTemplate but I would
also like to display the column headers.

Thanks

Hans
 
K

Kevin Yu [MSFT]

Hi Hans,

We have reviewed this issue and are currently researching on it. We will
update you ASAP. Thanks for your patience!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
S

Steven Cheng[MSFT]

Hi Hans,

As for the GridView or other template databound control, they'll populate
UI only when there is existing valid record binded with them. So I'm afraid
for empty datasource collection ,we could not make the GridView only
displaying Headers. If you do need to make only an headering line visible,
we may use another GridView or Table which is populated the headers with a
dummy record and hidden it when our gridview has records but make it
visible when there is no datarecords.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: Hans Merkl <[email protected]>
| Subject: Showing the column headers of a GridView when there is no data
| User-Agent: 40tude_Dialog/2.0.14.1
| MIME-Version: 1.0
| Content-Type: text/plain; charset="us-ascii"
| Content-Transfer-Encoding: 7bit
| Sender: (e-mail address removed)
| Reply-To: (e-mail address removed)
| Organization: RHM Media, LLC
| Date: Fri, 11 Nov 2005 15:48:35 -0500
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: pcp0011547978pcs.anapol01.md.comcast.net 68.54.166.32
| Lines: 1
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:357495
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi,
|
| Is there a way to show the column headers of a GridView control even if
| there is no data? The only thing I see is the EmptyDataTemplate but I
would
| also like to display the column headers.
|
| Thanks
|
| Hans
|
 
H

Hans Merkl

Hi Steven,

I was expecting that answer already. Can I put in a feature request for
future versions to add this feature?

Cheers

Hans
 
S

Steven Cheng[MSFT]

Thanks for your response Hans,

Of course, you can submit such a request on any of our products through the

(e-mail address removed) email alias.

Also, there are some blogs of ASP.NET Team members published on internet:

http://msdn.microsoft.com/asp.net/community/blogs/team/default.aspx

You can also add some entries of your feedback there. Many of the new
features of our products are collected from newsgroup and internet
community's feedback.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: Hans Merkl <[email protected]>
| Subject: Re: Showing the column headers of a GridView when there is no
data
| User-Agent: 40tude_Dialog/2.0.14.1
| MIME-Version: 1.0
| Content-Type: text/plain; charset="us-ascii"
| Content-Transfer-Encoding: 7bit
| Sender: (e-mail address removed)
| Reply-To: (e-mail address removed)
| Organization: RHM Media, LLC
| References: <[email protected]>
<[email protected]>
| Date: Mon, 14 Nov 2005 10:48:26 -0500
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: pcp0011547978pcs.anapol01.md.comcast.net 68.54.166.32
| Lines: 1
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:357964
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi Steven,
|
| I was expecting that answer already. Can I put in a feature request for
| future versions to add this feature?
|
| Cheers
|
| Hans
|
| n Mon, 14 Nov 2005 06:58:58 GMT, Steven Cheng[MSFT] wrote:
|
| > Hi Hans,
| >
| > As for the GridView or other template databound control, they'll
populate
| > UI only when there is existing valid record binded with them. So I'm
afraid
| > for empty datasource collection ,we could not make the GridView only
| > displaying Headers. If you do need to make only an headering line
visible,
| > we may use another GridView or Table which is populated the headers
with a
| > dummy record and hidden it when our gridview has records but make it
| > visible when there is no datarecords.
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| > --------------------
| >| From: Hans Merkl <[email protected]>
| >| Subject: Showing the column headers of a GridView when there is no data
| >| User-Agent: 40tude_Dialog/2.0.14.1
| >| MIME-Version: 1.0
| >| Content-Type: text/plain; charset="us-ascii"
| >| Content-Transfer-Encoding: 7bit
| >| Sender: (e-mail address removed)
| >| Reply-To: (e-mail address removed)
| >| Organization: RHM Media, LLC
| >| Date: Fri, 11 Nov 2005 15:48:35 -0500
| >| Message-ID: <[email protected]>
| >| Newsgroups: microsoft.public.dotnet.framework.aspnet
| >| NNTP-Posting-Host: pcp0011547978pcs.anapol01.md.comcast.net
68.54.166.32
| >| Lines: 1
| >| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15.phx.gbl
| >| Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:357495
| >| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| >|
| >| Hi,
| >|
| >| Is there a way to show the column headers of a GridView control even if
| >| there is no data? The only thing I see is the EmptyDataTemplate but I
| > would
| >| also like to display the column headers.
| >|
| >| Thanks
| >|
| >| Hans
| >|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top