How to Display ASP.NET GridView Header and Footer When No Data is Pres(dotnetspidor.blogspot.com)

submitted by sangam100sangam100(357) 3 years, 2 months ago

The default behaviour of asp.net gridview is that it hides both Gridview header and footer when no data is present. You can note the absence of data (that is not a single row is available) by putting text in EmptyDataTemplate of asp.net gridview. ---- other templates-----No data is present.<\EmptyDataTemplate> <\asp:GridView> But still you might want to show header and footer. What can we do? There exists a cheat! Just add an empty row to the datasource and bind your gridview to this datasource. Here goes the code.

add a comment |category: |Views: 299

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story