Hi there. I have the following code: http://jsfiddle.net/5ooyertu/
Right now, the table is being populated properly via the server side, and my paging works.
But I'd like to add the ability to delete and or edit a row. I would like to add a column called "Actions" that has two <a hrefs> - one to an edit method... and the other to a delete method.
Prior to using dataTables, I had some JavaScript logic that would iterate through an array of records from an Ajax, call and populate a regular table with the data, and the appropriate hyper-links. http://jsfiddle.net/wu0p2e1x/
As you can see from the above code example, in my hyperlinks, I need to pass a few pieces of data from each row, either as a part of the query string (in the case of edits) or just pass them as parameters to another JavaScript function that lives in the same file as this dataTable. I am wondering how I can change the logic that populates the dataTable to now include these two hyper-links?
I found this link: http://datatables.net/forums/discussion/5862/creating-an-action-column-for-icons-view-edit-delete# But the code didn't work for me and I think I read somewhere that the fnRender method is deprecated now.
If you have any suggestions, I'd appreciate it. I'm a novice with JavaScript so a detailed answer would be appreciated.