Move Edit, Details, Delete (col 0) to the Rightmost column of table.

Last post 06-01-2009 10:53 AM by sjnaughton. 7 replies.

Sort Posts:

  • Move Edit, Details, Delete (col 0) to the Rightmost column of table.

    05-29-2009, 11:45 AM
    • Member
      31 point Member
    • dcannon
    • Member since 05-28-2009, 9:01 PM
    • Posts 16

    I would like to move the edit, details, delete links to the right hand side of the table rows.

    I saw this post which seemed exactly like the answer. So I went ahead and implemented it as described.

    http://forums.asp.net/p/1379821/2917320.aspx

     But the GridCommand.ascx file uses Inherits="DynamicTest.GridCommand"

    I get this when I run one of the pages.

     'ASP.dynamicdata_fieldtemplates_gridcommand_ascx' does not inherit from 'System.Web.DynamicData.IFieldTemplate'.

    Can somebody tell me what this is or where I can find it? I thought it would be in Dynamic Data Futures but I got the 7/16 release

    which I believe is the latest and can't seem to find it in there.

    Thanks

  • Re: Move Edit, Details, Delete (col 0) to the Rightmost column of table.

    05-29-2009, 2:28 PM
    • Star
      10,226 point Star
    • chintanpshah
    • Member since 11-19-2008, 12:39 AM
    • Ahmedabad
    • Posts 1,823
    Why don't you use <asp:CommandField ShowSelect = "true" ShowDelete = "true" ... />
    Hope this helps...

    Don't forget to mark as answer, if it helps
  • Re: Move Edit, Details, Delete (col 0) to the Rightmost column of table.

    05-29-2009, 3:26 PM
    • Member
      31 point Member
    • dcannon
    • Member since 05-28-2009, 9:01 PM
    • Posts 16

    Thank you for the reply. The fields are already showing I just want to move them for the GridView generated in the List.aspx pages dynamically for each table.  Apparently the only way to do this is to change the IAutoFieldGenerator to add the command field at the end. Which I tried to do the only problem was the GridCommand.ascx Field Template inherited from a resource I don't have. Either I need to create it or I need to get a library that has the appropriate class.

      

    chintanpshah:
    Why don't you use <asp:CommandField ShowSelect = "true" ShowDelete = "true" ... />

  • Re: Move Edit, Details, Delete (col 0) to the Rightmost column of table.

    05-29-2009, 7:48 PM
    Answer
    • Star
      11,992 point Star
    • sjnaughton
    • Member since 04-29-2008, 1:11 PM
    • Newton-le-Willows, Merseyside, UK
    • Posts 2,516
    • TrustedFriends-MVPs

    Hi Dcannon, have a look at this thread http://forums.asp.net/p/1379821/2913829.aspx#2913829 this is a solution that should work for you.

    Steve Big Smile

    Always seeking an elegant solution.
    [Oh! If olny I colud tpye!]
    c# Bits blog
    Oh, and don't forget to mark as answer any posts that help you Big Smile
  • Re: Move Edit, Details, Delete (col 0) to the Rightmost column of table.

    05-29-2009, 8:06 PM
    Answer
    • Star
      11,992 point Star
    • sjnaughton
    • Member since 04-29-2008, 1:11 PM
    • Newton-le-Willows, Merseyside, UK
    • Posts 2,516
    • TrustedFriends-MVPs

    I have a sample based on the above mentioned thread if you like send me an e-mail and I'll send the sample by return.

    Steve Big Smile

    Always seeking an elegant solution.
    [Oh! If olny I colud tpye!]
    c# Bits blog
    Oh, and don't forget to mark as answer any posts that help you Big Smile
  • Re: Move Edit, Details, Delete (col 0) to the Rightmost column of table.

    05-29-2009, 8:28 PM
    Answer
    • Star
      11,992 point Star
    • sjnaughton
    • Member since 04-29-2008, 1:11 PM
    • Newton-le-Willows, Merseyside, UK
    • Posts 2,516
    • TrustedFriends-MVPs

    And just to make things easyer here it is on my blog with download: Move Command Link Column to End Column – Dynamic Data

    Steve Big Smile

    Always seeking an elegant solution.
    [Oh! If olny I colud tpye!]
    c# Bits blog
    Oh, and don't forget to mark as answer any posts that help you Big Smile
  • Re: Move Edit, Details, Delete (col 0) to the Rightmost column of table.

    06-01-2009, 10:14 AM
    • Member
      31 point Member
    • dcannon
    • Member since 05-28-2009, 9:01 PM
    • Posts 16

    Thank you for the reply. Your last post was what worked for me. The problem I was having is somehow related to the namespace declared in the codebehind preventing the type from being included. I replaced my GridCommand with yours and it works. Thank you for the help.

  • Re: Move Edit, Details, Delete (col 0) to the Rightmost column of table.

    06-01-2009, 10:53 AM
    • Star
      11,992 point Star
    • sjnaughton
    • Member since 04-29-2008, 1:11 PM
    • Newton-le-Willows, Merseyside, UK
    • Posts 2,516
    • TrustedFriends-MVPs

    your welcome Big Smile

    Steve Big Smile

    Always seeking an elegant solution.
    [Oh! If olny I colud tpye!]
    c# Bits blog
    Oh, and don't forget to mark as answer any posts that help you Big Smile
    Filed under:
Page 1 of 1 (8 items)