One combined footer in GridView – ASP.NET

This link explains how to display the footer of a Gridview as one large cell rather than every cell has its own footer. I tried this solution but it did not work for me. I tweaked it and posted the correct one that worked for me.

Before you can actually use this code, make sure your set the Show Gridview property to true in Properties windows.

  1. Select your GridView, go to properties window, click on the lighting icon. Double click on the “RowCreated” event. It will create one if it is not already there and will directly take you there. If there was already one it will simply take you there.
  2. This should be the code in this new event

The advantage of the above code is

  1. It works
  2. It centers your text (link) in the middle of footer. You can add more styles if you like.

 

2 Responses to One combined footer in GridView – ASP.NET
  1. Manish says:

    Hi,

    Thanks for the code. Can you please share how this can be written in VB.NET instead of C#.

    Appreciate your help.

  2. admin says:

    The equivalent VB.NET code is the following

    I simply used this link to convert the code.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

*