472,956 Members | 2,614 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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 9179
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...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.