Columns and IDs Sorting
Columns and IDs Sorting

Is it possible to do an if statement that will only make certain columns sortable if they have certain ids? This is something I want to employ on a global scale for all of my tables so that I don't have to keep repeating the same code.
This discussion has been closed.
Replies
[code]
aoColumnDefs: [
{
aTargets: [ 'no-sortable' ],
bSortable: false
]
[/code]
Allan
[code]
/* DataTables */
if ($('.dynamicTable').size() > 0)
{
$('.dynamicTable').dataTable({
"sPaginationType": "bootstrap",
"sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
"oLanguage": {
"sLengthMenu": "_MENU_ records per page"
},
aoColumnDefs: [{
aTargets: [ 'check', 'id', 'actions', 'created'],
bSortable: false
}]
});
}
[/code]