Is it possible to add new table attribute with serverside data
Is it possible to add new table attribute with serverside data
Currently what i get against my every table row is
[code]
[/code]
I am adding data-title attributes using
[code]
"fnCreatedRow": function (nRow, aData, iDataIndex) {
$(nRow).attr('data-title', 'abc'); }
[/code]
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
[code]
{"sEcho":"1","iTotalRecords":193,"iTotalDisplayRecords":193,"aaData":[{"UserId":0,"DT_RowId":123, "Data_Title": "Test"}]}
[/code]
Thanks in advance for help.
[code]
[/code]
I am adding data-title attributes using
[code]
"fnCreatedRow": function (nRow, aData, iDataIndex) {
$(nRow).attr('data-title', 'abc'); }
[/code]
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
[code]
{"sEcho":"1","iTotalRecords":193,"iTotalDisplayRecords":193,"aaData":[{"UserId":0,"DT_RowId":123, "Data_Title": "Test"}]}
[/code]
Thanks in advance for help.
This discussion has been closed.
Replies
[code]
$(nRow).attr('data-title', aData.Data_Title);
[/code]
Allan