473,473 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

gridview does not show up if there is no data

Cant believe I spent 4 hours trying to figure out why only the first grid in
my new multiview shows up and the other grids are invisible in the other
views I just added. The database tables were not populated except for the
table I had in the first view! INCREDIBLE: All that data I saw during
design, and assumed it came from the database, was just bill gates made up
data that the designer needed so you could see what you were doing.

So who decided that the header, footer, even the grid would not be displayed
if there is no data?

I googled around and found a solution here
http://weblogs.asp.net/bradygaster/a...le-Footer.aspx
simple, but I am not using ObjectDataSource.

I found this, but could not get it to work:
http://dotnetslackers.com/GridView/r...ta_Exists.aspx

I added the required "usings" and then put that class at the bottom of
"Default.aspx.cs" but the override CreateChildControls never fired. Is
there a simple way to get the grid and its headers to show up?

...TIA..
--
================================================== =====================
Beemer Biker joestateson at grandecom dot net
http://TipsForTheComputingImpaired.com
http://ResearchRiders.org Ask about my 99'R1100RT
================================================== =====================

Nov 8 '06 #1
2 9197
I'm pretty sure bill had nothing to do with the implementation. Have you
tried setting the emptydatatext property of the gridview?

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------
"Beemer Biker" <js*******@swri.eduwrote in message
news:12*************@corp.supernews.com...
Cant believe I spent 4 hours trying to figure out why only the first grid
in
my new multiview shows up and the other grids are invisible in the other
views I just added. The database tables were not populated except for the
table I had in the first view! INCREDIBLE: All that data I saw during
design, and assumed it came from the database, was just bill gates made up
data that the designer needed so you could see what you were doing.

So who decided that the header, footer, even the grid would not be
displayed
if there is no data?

I googled around and found a solution here
http://weblogs.asp.net/bradygaster/a...le-Footer.aspx
simple, but I am not using ObjectDataSource.

I found this, but could not get it to work:
http://dotnetslackers.com/GridView/r...ta_Exists.aspx

I added the required "usings" and then put that class at the bottom of
"Default.aspx.cs" but the override CreateChildControls never fired. Is
there a simple way to get the grid and its headers to show up?

..TIA..
--
================================================== =====================
Beemer Biker joestateson at grandecom dot net
http://TipsForTheComputingImpaired.com
http://ResearchRiders.org Ask about my 99'R1100RT
================================================== =====================

Nov 9 '06 #2
"Alvin Bruney [MVP]" <www.lulu.com/owcwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
I'm pretty sure bill had nothing to do with the implementation. Have you
tried setting the emptydatatext property of the gridview?

-
I am reading up on that property, thanks. However, it was easy to hit
"insert" in the db manager and add records just for testing. I added
"engineers best guess" and "chop shop scheduleing" for some fields and once
the engineers saw that they decided to acquire some real data and put it
into the db so the presentation would look good.

No, bill probably had nothing to do with the implementation, but there is
probably a microsoft dotnet junkie responsible for all the IE fixes ;-)

-
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------
"Beemer Biker" <js*******@swri.eduwrote in message
news:12*************@corp.supernews.com...
>Cant believe I spent 4 hours trying to figure out why only the first grid
in
my new multiview shows up and the other grids are invisible in the other
views I just added. The database tables were not populated except for
the
table I had in the first view! INCREDIBLE: All that data I saw during
design, and assumed it came from the database, was just bill gates made
up
data that the designer needed so you could see what you were doing.

So who decided that the header, footer, even the grid would not be
displayed
if there is no data?

I googled around and found a solution here
http://weblogs.asp.net/bradygaster/a...le-Footer.aspx
simple, but I am not using ObjectDataSource.

I found this, but could not get it to work:
http://dotnetslackers.com/GridView/r...ta_Exists.aspx

I added the required "usings" and then put that class at the bottom of
"Default.aspx.cs" but the override CreateChildControls never fired. Is
there a simple way to get the grid and its headers to show up?

..TIA..
--
================================================= ======================
Beemer Biker joestateson at grandecom dot net
http://TipsForTheComputingImpaired.com
http://ResearchRiders.org Ask about my 99'R1100RT
================================================= ======================


Nov 10 '06 #3

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

Similar topics

1
by: Miguel Dias Moura | last post by:
Hello, I have a GridView in my page which is created in runtime. It works fine. My page has 2 Asp Buttons: - The HIDE button makes GridView.Visible = False; - The SHOW button makes...
2
by: Nick Hodge \(MVP\) | last post by:
Hi I currently have a gridview connected to a SQLDatasource. (This data comes from a remote iSeries). It shows catalogue sales as they build during the day (works great). I have a local SQL...
0
by: DC | last post by:
The problem I'm using the .NET GridView and FormView objects for the first time and im getting the error "An OleDbParameter with ParameterName '@ID' is not contained by this...
1
by: needin4mation | last post by:
Not sure what I'm doing wrong here. I have a gridview and a detailsview. The detailsview is set to insert by default. When I insert data the detailsview it works. The data goes in the database....
1
by: mitchman10 | last post by:
My Time table has TimeID,Employee,PayPeriod,ChargeCodeID,Hours My Chargecode table has ChargecodeID,c_Text I need an Editable datagrid that will show the TimeID,Employee,PayPeriod,C_Text in a...
13
by: Tomasz Jastrzebski | last post by:
Helo All, The problem: GridView control does not render at all (header/footer) when the data source is empty. I have seen a similar question posted already, but I just can not believe there is...
4
by: mohaaron | last post by:
This seems like it should be simple to do but for some reason I have been unable to make it work. I would like to databind a SqlDataSource to a GridView during the click event of a button. This...
3
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I have a gridview with several template columns and a few command button columns, column 1 and 2 are dropdown boxes, column 3 is a checkbox and column 4 is a text box, followed by command button...
6
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I have a gridview control with a template column that has a textbox and when the control is bound to the datasource the textbox is filled ok. I then change what is in the textbox in the gridview...
2
by: Ralf | last post by:
I have a custome request to print a gridview with lots of columns, 31 to be exact. I know how to print out a gridview, done it already for a GV with 6 columns. But, this GV is very wide and will...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.