473,289 Members | 2,040 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

Showing footer in an empty GridView...

Hi,

I've spent the last hour trawling google for this - but all I find are
people asking the same question!

I have a gridview which is being databound to an empty datasource. I can
display the 'EmptyDataText' no problem, but the header and footer do not
display. The header I can live without - but the footer contains the 'Add
new item' form elements, so needs to be visible when the grid is empty.

Is there any (elegant) way to show the header/footer of an empty gridview?

Thanks in advance,

Stu
May 19 '06 #1
1 4905
Repeat the footer markup in the EmptyDataTemplate:
http://msdn2.microsoft.com/en-us/lib...atemplate.aspx
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Stu Lock" wrote:
Hi,

I've spent the last hour trawling google for this - but all I find are
people asking the same question!

I have a gridview which is being databound to an empty datasource. I can
display the 'EmptyDataText' no problem, but the header and footer do not
display. The header I can live without - but the footer contains the 'Add
new item' form elements, so needs to be visible when the grid is empty.

Is there any (elegant) way to show the header/footer of an empty gridview?

Thanks in advance,

Stu

May 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Hans Merkl | last post by:
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. ...
2
by: Matt | last post by:
I can not get the horizontal gridlines to show up on a Gridview. I have changed the selection to both and horizontal with no sign of them. Also, when I set the Gridlines property to Vertical or...
0
by: J Li | last post by:
I have a GridView with paging enabled with controls set up in the footer for adding new rows. In one column, I have two related dropdown list controls, DrowDown B's list should change depending on...
0
by: =?Utf-8?B?Vmlua2k=?= | last post by:
Hello Everyone, I have a gridview. I calculated some values in the gridview for the footer of the gridview so basically I am adding all the values that are displayed in the gridview for each...
0
by: gnewsgroup | last post by:
Well, I am trying to use the footer row of a GridView for insertion purpose. There are some articles about this, for example, the gridviewguy.com has an example, which always displays the footer...
2
by: Tim Royal | last post by:
I'm using a GridView inside a Wizard Control with a textbox and two listboxes in the footer. I populate these listboxes from the database if the page isn't on postback (and the textbox is left...
1
by: pieandpeas | last post by:
Hi, even with simple text written in the footer template of my gridview it does not show up... at all. am i doing something wrong <asp:GridView ID="gvw" runat="server"...
6
by: Steve Harclerode | last post by:
Hi, I'm trying to get my DataGrid to show headers and footers when no rows are returned from the datasource. Below is code that shows the first TemplateField. Is there an easy way to get at...
1
by: naasirsom | last post by:
Dear sir, I am using Gridview asp.net 2.0, I have a problem with Gridview Footer Template. I have put Button, Textbox and RequiredValidator in the Footer Template and Want to validate...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.