adding edit and delete options to each row

adding edit and delete options to each row

mariozmarioz Posts: 9Questions: 0Answers: 0
edited November 2010 in General
whats the best way to add action links (with images) to each row. e.g. i want to have a "edit" and a "delete" option for each row. In addition i want to add a "create new" link above. These links will take you to new pages to perform those actions.

many thanks

Replies

  • derapederape Posts: 10Questions: 0Answers: 0
    bump
    Did you made any progress? I'd like to know that too :-)

    You somehow would need the ID of the record somehow in the "tr" of your table. Is datatable able to handle that "magically" or do I have to take care of that by myself?

    Regards,

    Christoph
  • derapederape Posts: 10Questions: 0Answers: 0
    Nevermind:
    http://www.datatables.net/forums/discussion/4945/3-buttons-next-to-each-row-for-crud-operation-in-a-different-page/p1

    I guess you have to write just all the HTML in the datatable array just like you want it...
  • derapederape Posts: 10Questions: 0Answers: 0
    edited August 2011
    okay so I can manipulate the HTML containing the "td"-tag. But how can I manipulate for example the tag itself? for example
    [code]
    ...




    ...
    [/code]
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    [quote]derape said: I guess you have to write just all the HTML in the datatable array just like you want it[/quote]
    You can also use fnRender to change cell values into your links.

    if you want to get and change the TD or TR elements, you can use API functions like fnGetNodes, fnGetPosition
    http://www.datatables.net/ref#fnGetNodes
This discussion has been closed.