Yet Another Blog on ASP.NET and Some Other Stuff

Manipulating ColSpan Attribute of Footer Row in GridView

Posted in ASP.NET, C#, GridView, VB.NET, Web Development by Mustafa Basgun on January 20th, 2008

There may be some cases that the Footer of a GridView is desired to be displayed as one cell, which means setting the ColumnSpan property of the Footer’s first cell to the number of columns of the GridView. As there are some other possible workarounds to accomplish this, here is my way by adding a few lines to the OnRowCreated method.

First, make sure that ShowFooter property of the GridView is set to True:

01202008_1.gif

VB.NET:

01202008_2.gif

C#:

01202008_3.gif

One Response to 'Manipulating ColSpan Attribute of Footer Row in GridView'

Subscribe to comments with RSS or TrackBack to 'Manipulating ColSpan Attribute of Footer Row in GridView'.

  1. Ben said, on May 15th, 2008 at 3:32 pm

    Perfect! Copy-and-paste code samples would be nice.

Leave a Reply