bSortable clears onclick?
bSortable clears onclick?
![aggieben](https://secure.gravatar.com/avatar/3fbc237a51acf024e65ae4da233f58e2/?default=https%3A%2F%2Fvanillicon.com%2F3fbc237a51acf024e65ae4da233f58e2_200.png&rating=g&size=120)
I have a column of boolean data on which I wish to search but not sort. I set my columns options like so:
[code]
oTable = $('#table-id').dataTable({
'aoColumns': [
{ 'bVisible': false },
null,
null,
null,
null,
null,
null,
{ 'bSortable': false, 'sClass': 'flag' }
],
/* other options */
});
[/code]
It appears that setting the 'bSortable' option to false also clears any onclick function for elements in the header cell. I have a checkbox in use as a filter for that column, and I no longer catch click events after setting 'bSortable' to false.
[code]
oTable = $('#table-id').dataTable({
'aoColumns': [
{ 'bVisible': false },
null,
null,
null,
null,
null,
null,
{ 'bSortable': false, 'sClass': 'flag' }
],
/* other options */
});
[/code]
It appears that setting the 'bSortable' option to false also clears any onclick function for elements in the header cell. I have a checkbox in use as a filter for that column, and I no longer catch click events after setting 'bSortable' to false.
This discussion has been closed.
Replies
Thanks.