Set the Value of Table header in fnReloadAjax

Set the Value of Table header in fnReloadAjax

tc4tc4 Posts: 1Questions: 0Answers: 0
edited May 2013 in General
Hi,


My Datatable is

$('#example').dataTable( {
"iDisplayLength": 25,
"bProcessing": true,
"bServerSide": true,
"sPaginationType": "full_numbers",
"aoColumns": [ {"sTitle": "Date"}, {"sTitle": "Subs"}, {"sTitle": "Views"}, {"sTitle": "Ded"} ],
"sAjaxSource": "x.php",
} );

Now Following is the sequence of events:

1) On click on table column i am calling fnReloadAjax function
2) here I am setting oSettings.sAjaxSource to a new url

Which is working fine

Problem Statement :

Now i also want to change the table header fileds so i tried various options like

a) oSettings.aoHeader ="'[ {'sTitle': 'Date'}, {'sTitle': 'Msisdn'}, {'sTitle': 'Status'}]";
b) oSettings.aoColumns ="'[ {'sTitle': 'Date'}, {'sTitle': 'Msisdn'}, {'sTitle': 'Status'}]";
c) oSettings.aoHeader =["Date","Msisdn","Status", "partner"];
d) oSettings.aoColumns =["Date","Msisdn","Status", "partner"];
etc..

But none worked for me..

Please guide me as how i can change Table header fields.

Thanks,
This discussion has been closed.