How can I enable/disable buttons, filters and order of datatables dinamically?

How can I enable/disable buttons, filters and order of datatables dinamically?

manuemanue Posts: 2Questions: 1Answers: 0

I want to show a datatable in a HTML page where the datatable only has enabled the table (not buttons, not filter, etc.)
If I execute some jquery code, I want to enable the buttons, the filtering and ordering .

I want to do something like put 'dom' = 'ti' at the begining, and when I execute some jquery function, 'dom' will change to 'Bltipr'

Answers

  • Tom (DataTables)Tom (DataTables) Posts: 139Questions: 0Answers: 26

    There isn't an option to change the dom dynamically.

    If you want to change the dom you would have to reinitialise the table with the new options you wanted using destroy.This would allow you to recreate the table with the new dom settings.

    Thanks

    Tom

  • manuemanue Posts: 2Questions: 1Answers: 0

    Thanks Tom,
    Can I disable/enable filtering and ordering dynamically?

  • Tom (DataTables)Tom (DataTables) Posts: 139Questions: 0Answers: 26

    You can't disable filtering/ordering dynamically, you would have to reinitialise the table each time.

    Thanks

    Tom

This discussion has been closed.