Quantcast
Viewing all articles
Browse latest Browse all 82141

Is it possible to add new table attribute with serverside data

Currently what i get against my every table row is
<tr id="123" class="odd" data-title="abc">

I am adding data-title attributes using
"fnCreatedRow": function (nRow, aData, iDataIndex) {               
                $(nRow).attr('data-title', 'abc'); }

what i want to accomplish is to get my value instead of abc for data-title attribute in table row, is their any way of doing this in datatables? My data comes from serverside as

{"sEcho":"1","iTotalRecords":193,"iTotalDisplayRecords":193,"aaData":[{"UserId":0,"DT_RowId":123, "Data_Title": "Test"}]}

Thanks in advance for help.

Viewing all articles
Browse latest Browse all 82141

Trending Articles