ColVis: “Restore original” button does not trigger fnStatechange
ColVis: “Restore original” button does not trigger fnStatechange
antoniosouto
Posts: 2Questions: 0Answers: 0
Hello.
First of all I am a DataTables Fan! Allan: Great Job with it and with ColVis as well!
I am using ColVis in a table with individual column filters and I use fnStateChange to remove/reapply the column filter when I hide/restore it. As I have a lot of columns I let some of them initially hidden and set bRestore to true, so the user may change the columns visibility at will and return to the original view with just one click.
Everything works just fine when I click on the columns checkboxes. But if I click on the restore button fnStatechange is not triggered, even though the columns visibility state has changed. Is that the expected behaviour?
I am using DataTables 1.8.2 and ColVis 1.0.6
Best Regards,
First of all I am a DataTables Fan! Allan: Great Job with it and with ColVis as well!
I am using ColVis in a table with individual column filters and I use fnStateChange to remove/reapply the column filter when I hide/restore it. As I have a lot of columns I let some of them initially hidden and set bRestore to true, so the user may change the columns visibility at will and return to the original view with just one click.
Everything works just fine when I click on the columns checkboxes. But if I click on the restore button fnStatechange is not triggered, even though the columns visibility state has changed. Is that the expected behaviour?
I am using DataTables 1.8.2 and ColVis 1.0.6
Best Regards,
This discussion has been closed.
Replies
$('button.ColVis_Restore').live('click', function() {
oTable.dataTableSettings[ 0 ].aoColumns[ originaly_hidden_column_id_a ].bSearchable = false;
oTable.dataTableSettings[ 0 ].aoColumns[ originaly_hidden_column_id_b ].bSearchable = false;
...
oGridTable.fnDraw();
});
Allan