471,595 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,595 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 9117
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Nick Hodge \(MVP\) | last post: by
1 post views Thread by needin4mation | last post: by
1 post views Thread by mitchman10 | last post: by
13 posts views Thread by Tomasz Jastrzebski | last post: by
3 posts views Thread by =?Utf-8?B?UGF1bA==?= | last post: by
6 posts views Thread by =?Utf-8?B?UGF1bA==?= | last post: by
2 posts views Thread by Ralf | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by Anwar ali | last post: by

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.