row specific buttons

row specific buttons

MithrusMithrus Posts: 19Questions: 0Answers: 0
edited February 2010 in General
I'm trying to add some row specific actions to the table, and so far the best I can do is have my code hard code the values into the . Assuming I store the row key value(s) in the 's id, would there be a way to add generic code to call a url and pass in the row specific tr id?

Or if there is a better way to approach this, my goal is to have View and Edit buttons for each row I'm displaying (I'm using dataTables to display a summary set of fields to the user, but I need them to be able to view/edit them all).

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    If you have the id available in the row, can you not just use parentNode (or something like that in jQuery) to go back up the DOM and get the data. Or use fnGetData() and pass it the TR in question and it will give you the array of data for that row. From there you can take whatever action you want with the specific id. Or have I missed something?

    Allan
This discussion has been closed.