GridView Footer - Put a link into the Edit / Delete column

R

Remy

Hi
I would like to put a link into the Footer of the first column of an
ASP.NET 2.0 GridView. By first column I mean the column where it
normally displayes the Edit and Delete link.

I've built the Insert functionality into the footer, but I only wanna
display those controls if someone clicks on the link. At the moment I
hide the whole footer and I have the link outside of the grid.

I guess I could just add another table below the grid to make it look
like the footer, but I figured I check if there is a better way first.

Thanks

Remy
 
G

GCeaser

Remy,

To the best of my knowledge, you need to convert the column that
you want to add the link in to a template column. If you are using the
Auto Generate Delete / Edit etc of the grid view - IE those properties
are set to true, I do not believe you will see the column that you want
to add the link to when you go to edit the columns. The alternative I
have found is to turn off the Auto Generate properties - go into the
columns of the grid and add the Command columns for Edit, Update,
Cancel. Set all of the columns properties are you want them (IE if you
use images for the buttons etc). I would apply all your changes by
clicking the OK button and ensuring the grid still looks as desired.

At this point - either if you had to follow the above steps or it
you already had a commandcolumn in the grid, go back into the column
editor, select the commandcolumn and click on the link at the bottom of
the properties area to 'Convert this field into a TemplateField'.

You can then edit the footer template for the column and add your
link. I hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top