Reputation: 2422
My question: Is there any 1.10 documentation for features like aoColumns?
Background: I am using DataTables 1.10. To create a datatable with options enabling sorting on two of my three columns I found the following (which works):
dtable = $('#dtable').DataTable({
"aoColumns" : [ {
"sWidth" : "90%",
"bSortable" : true,
"class" : "t_col",
"name" : 'trip'
}, {
"sWidth" : "5%",
"bSortable" : true,
"class" : "s_col",
"name" : 'stat'
}, {
"sWidth" : "5%",
"bSortable" : false,
"class" : "d_col",
"name" : 'del'
}]
});
I found this example online and (eventually) found documentation about aoColumns on the DataTable legacy site. However, that legacy site clearly states, "This site contains the legacy documentation for DataTables v1.9 and earlier for reference only." I can't find a 1.10 reference for this type of configuration anywhere. Can someone point me to it if it exists? (Same goes for callback functions)
Upvotes: 0
Views: 258
Reputation: 475
There's a manual and reference on the front page. It seems that they have renamed a lot of the properties.
E.g. aoColumns
and aoColumnDefs
are now columns
(here) and columnDefs
(here)
Callback are here.
So your code in ver. 1.10 would be:
dtable = $('#dtable').dataTable({
"columns" : [ {
"width" : "90%",
"orderable" : true,
className : "t_col",
"name" : 'trip'
}, {
"width" : "5%",
"orderable" : true,
className : "s_col",
"name" : 'stat'
}, {
"width" : "5%",
"orderable" : false,
className : "d_col",
"name" : 'del'
}]
});
Upvotes: 2