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

Discussion in 'ASP .Net' started by Remy, Jun 5, 2006.

  1. Remy

    Remy Guest

    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
     
    Remy, Jun 5, 2006
    #1
    1. Advertising

  2. Remy

    Guest

    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.
     
    , Jun 5, 2006
    #2
    1. Advertising

  3. Remy

    Remy Guest

    That worked perfectly.
    Thanks

    wrote:
    > 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.
     
    Remy, Jun 14, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?a2Vu?=
    Replies:
    1
    Views:
    10,349
    Wiktor Zychla [C# MVP]
    Jan 23, 2006
  2. Learner
    Replies:
    2
    Views:
    2,143
    Learner
    Mar 13, 2006
  3. Keith G Hicks
    Replies:
    3
    Views:
    773
    Keith G Hicks
    Feb 18, 2008
  4. Jaime Stuardo

    GridView control enters edit mode when I click Edit link twice

    Jaime Stuardo, Apr 7, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    408
    Jaime Stuardo
    Apr 7, 2006
  5. tMan

    How to hide Gridview footer in edit mode

    tMan, May 1, 2007, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    430
Loading...

Share This Page