How you use DataTable API ?
How you use DataTable API ?

Hello, everyone.
I know that, probably, dump question, but i don't get that:
Why does all API methods return ... API object ?
Like, i want to get information about column:
table.column(14) - i assume that will return me column object, or some info about column with index equal to 14,
but its returns API object, so why its doing that, and how can i get column information ?
thanks !
This discussion has been closed.
Answers
The API using a chaining interface -
column()
populates the API instance with data about whatever is selected, and then you use another method to get what you need from it. For examplecolumn().data()
to get the column's data.It similar to jQuery - although in DataTables the methods available depend upon the methods that were used to populate the instance with results.
Allan
Thank you Allan.
I did not found data method