I wonder if anyone else has faced this problem prior. I am loading data into a DataTable via ajax. I am trying to add custom attribute rel to each rows.
I have found a similar question here but it is loading data directly. I could not figure out how to add the custom attribute.
My initialisation code is:
$('#DataTable').dataTable({
"bLengthChange": false,
"bFilter": false,
"sPaginationType": "full_numbers",
"bStateSave": true,
"bProcessing": false,
"sAjaxSource": "<?php echo site_url().$page_name.'/get_data/'?>",
"aoColumns": [
{ "mData": "Column1", sClass: "center "},
{ "mData": "Column2", sClass: "center "},
{ "mData": "Column3", sClass: "center "},
{ "mData": "Column4", sClass: "center "},
{ "mData": "Column5", sClass: "center "}
]
});
The data rows gets populated. Now the problem is the one or more data may have similar parent so i want to add a custom attribute to find the rows with same parent and take them to edit on double click of any rows.
How can i add the custom attribute?