Setting new default values
Setting new default values
Okay, here is another question: I use the datatable in a lot of pages with mostly identical init-code. How and where do I store there default-values, so that I don't have to set them every time? I'm sure, this is an easy task, but right now, I don't see the way... :/
This discussion has been closed.
Replies
1. Alter the defaults in DataTables JS file - search for "classSettings" in the code - all the defaults are in there.
2. A possibly nicer method since it doesn't alter the distribution code is to create a base object with the settings you want which are common to all tables, and then 'duplicate' that using $.extend() for each table, and modify the cloned object for each specific table as required.
Hope that helps,
Allan