1.10 upgrade FAQs
DataTables 1.10 is a major upgrade to DataTables, the biggest in its six year history, and a lot has changed. Backwards compatibility is extremely important in a software library and DataTables is no exception, so generally the new version should just drop in, but there are some changes you need to be aware of, and questions arise from that. This document attempts to answer some of those questions.
1.10 FAQs
Q. Do I have to use the new naming scheme?
A. No. You can continue to use the Hungarian notation of DataTables 1.9 and earlier. 1.10 supports both forms. The new camelCase notation is the preferred style, and is documented on this site, but either form can be used.
Q. Can I access the documentation for older versions of DataTables?
A. Yes, the documentation for DataTables 1.9 is available at legacy.datatables.net. The documentation there is specifically for v1.9.4 which was the last stable release before DataTables 1.10.
Q. I get an error message stating that an API method is not available
A. Very likely you are using a jQuery object rather than a DataTables API instance. The form $().dataTable()
will return a jQuery object, while $().DataTable()
returns a DataTables API instance. Please see the API documentation for further information.
Q. I get an error message when trying to access one of the old fn*
style API methods
A. This is the inverse of the above issue. DataTables 1.9 attached a number of functions (all starting with fn
) to the jQuery object. The old API is still available, but you must use $().dataTable()
to access the jQuery object.
Q. I used fnRender
(removed in 1.10), what can I use instead?
A. fnRender
was deprecated in DataTables 1.9 and removed in 1.10 in order to provide performance and feature enhancements that wouldn't have been possible without removing the function. The columns.data
and columns.render
options can be used to manipulate the data, while columns.createdCell
can be used to manipulate the table cell nodes if required.
Other issues?
This is an evolving document. As questions get asked, I can update the information here, so please, if you do happen to encounter any other issues during the upgrade process, let me know in the forums so it can be addressed or fully documented as required.