Solved

Column span all columns when Gridview Data is empty

Posted on 2013-01-25
4
524 Views
Last Modified: 2013-01-28
Hello Experts,

I was trying to show gridview Headers , when there is no data, but I cannot column span all columns and remove the rowstyle and show the text "No Data Present".

Sample gridview:

ID         NAME
--        ------------

     NO DATA PRESENT


Something like above.
0
Comment
Question by:ASPDEV
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 41

Expert Comment

by:guru_sami
ID: 38820693
With 4.0 you can set ShowHeaderWhenEmpty="True" and have EmptyDataTemplate to have your text.
0
 

Author Comment

by:ASPDEV
ID: 38827257
Sorry, It was ASP.NET 3.5.
0
 
LVL 41

Accepted Solution

by:
guru_sami earned 500 total points
ID: 38827602
Then there isn't an built-in way but weird workarounds.
Some of them listed here
0
 

Author Closing Comment

by:ASPDEV
ID: 38828876
Thanks.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question