473,320 Members | 1,978 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,320 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 4915
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: 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...
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.