Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9190177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:24:07+00:00 2026-06-17T20:24:07+00:00

Aspx, Entity, on my gridView I made a footer for a new button. It

  • 0

Aspx, Entity, on my gridView I made a footer for a new button. It shows when there are items, but not when data is empty. gridView’s ShowFooter = True. Not sure why it won’t show when empty, is there another property I maybe missing? I know a workaround could be place a dummy row in the database, but think there should be a better way to start off at 0. If you have any more questions, please ask.

<asp:TemplateField HeaderText="New" >
        <FooterTemplate >
         <asp:Button ID="btnNew" CssClass="DDButton" runat="server" Text="New" CommandName="New" OnClick="new_item" />
        </FooterTemplate>
</asp:TemplateField>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T20:24:08+00:00Added an answer on June 17, 2026 at 8:24 pm

    .Net 4.0 added the ShowHeaderWhenEmpty property on the GridView but unfortunately no ShowFooterWhenEmpty. However there is still the EmptyDataTemplate:

    <asp:GridView runat="server" ID="myGridView">
        <EmptyDataTemplate>
            <asp:Button ID="btnNew" CssClass="DDButton" runat="server" Text="New" CommandName="New" OnClick="new_item" />
        </EmptyDataTemplate>
    </asp:GridView>
    

    As this will not be in a GridViewRow I don’t think your RowCommand event will fire but you seem to be handling the click of the button in a separate method anyway.

    Reference for GridView.EmptyDataTemplate: http://msdn.microsoft.com/en-gb/library/system.web.ui.webcontrols.gridview.emptydatatemplate.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

HI Guys, I was watching these videos series about Entity Framework: http://msdn.microsoft.com/en-us/data/ff191186.aspx is that
I add an ADO.NET Entity Data Model to my project but can't use in
I'm new to Entity Framework, and I'm think there is something that I misunderstand
Aspx Page: $(document).ready(function() { $(#btnn).click(function() { $.ajax({ type: POST, url: TestPage.aspx/emp, data: {}, contentType:
I have two aspx pages: DashboardPreview.aspx: This is the homepage. It shows top 5
I am creating an ASPX application that collects data from the user can creates
Reading this MSDN article titled Working with ObjectSet (Entity Framework) It shows two examples
My ASP.NET MVC 2 application uses Entity Framework 4.0 for the data model. Following
According to MSDN (http://msdn.microsoft.com/en-us/library/dd487208.aspx), there is an object called DbDataReader that is created in
I am new to repository pattern but i tried, my goal is to make

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.