Using Ajax, and adding Actions columns

Using Ajax, and adding Actions columns

arquesingarquesing Posts: 3Questions: 1Answers: 0
edited October 2013 in General
First of all, congrats for your project, I like datatables ;)

I was reading the documentation and forum and I finally can use Datatables with ajax. The thing is I used this:
[code]
$('#myTable').dataTable( {

"bProcessing": true,
"bServerSide": true,
"sPaginationType": "full_numbers",
'bPaginate': true,
"sPaginationType": "bootstrap",
'bLengthChange': true,
'bFilter': true,
'bSort': true,
'bInfo': true,
'bAutoWidth': false,
"sServerMethod": "POST",
"sAjaxSource": '/index.php/users/get_all',
"aoColumns" : [
{"mDataProp": "ID","sTitle": "Id"},
{"mDataProp": "NAME","sTitle": "Name"},
{"mDataProp": "ADDRESS","sTitle": "Address"} //and a couple of columns more
]
} );
[/code]
Everything is fine, awesome, but... I want to add an extra column with actions for every row (e.g. links for update and delete). I read fnRender is deprecated and now we should use mRender with mData.
I didn't manage to make my table work with mData, so I used mDataProp with aoColumns, and the examples I found where with aoColumnsDef and mData, so I don't know how to use mRender with my code o how "translate" my code to use aoColumnsDef with mData.

I hope I explained well.

Replies

  • arquesingarquesing Posts: 3Questions: 1Answers: 0
    any suggestion? please :(
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Please link to the page that shows the problem, as noted in the forum rules, so we can offer some help. I've no idea why the mData / mRender didn't work for you at the moment.

    Allan
This discussion has been closed.