Custom options at initialization
Custom options at initialization
ilzat
Posts: 3Questions: 1Answers: 0
Hello,
How connect another options?
like this:
$.extend( $.fn.dataTable.defaults, {
searching: false,
ordering: false
} );
This discussion has been closed.
Answers
I don't really understand the question I'm afraid. You can simply add other options into your object if you want other options to be set by default.
Allan
Ok. I will try to explain
I need dynamically edit my table. The script should change the number and names of columns, depending on the user's actions.
Should only change this code:
columns: [
{ name: "_id", data: "mods.mod_id" },
{ name: "_name", data: "mods.size" },
{ name: "_property", data: "mods.weight_1_m2" }
],
I want to make this code as a separate setup. If necessary - change.
and display the table every time with option:
"destroy": true
I'm afraid I still don't really understand. You've set your defaults above, and then you initialise the columns. I don't understand what the problem with that is. That should work exactly as you describe.
Allan
Hi allan, it really works, wonderful !
But I think that there is a target solution with API.
Thank you!