DATA Source DataTables

HTML (DOM) sourced data

The foundation for DataTables is progressive enhancement, so it is very adept at reading table information directly from the DOM. This example shows how easy it is to add searching, ordering and paging to your HTML table by simply running DataTables on it.
Name Position Salary Office CV Status E-mail Action
Tiger Nixon System Architect $320,800 Edinburgh hired t.nixon@datatables.net
Garrett Winters Accountant $170,750 Tokyo Pending g.winters@datatables.net
Ashton Cox Junior Technical Author $86,000 San Francisco in process a.cox@datatables.net
Cedric Kelly Senior Javascript Developer $433,060 Edinburgh in process c.kelly@datatables.net
Airi Satou Accountant $162,700 Tokyo hired a.satou@datatables.net
Brielle Williamson Integration Specialist $372,000 New York Pending b.williamson@datatables.net
Herrod Chandler Sales Assistant $137,500 San Francisco in process h.chandler@datatables.net
Rhona Davidson Integration Specialist $327,900 Tokyo hired r.davidson@datatables.net
Colleen Hurst Javascript Developer $205,500 San Francisco Pending c.hurst@datatables.net
Sonya Frost Software Engineer $103,600 Edinburgh in process s.frost@datatables.net
Jena Gaines Office Manager $90,560 London hired j.gaines@datatables.net
Quinn Flynn Support Lead $342,000 Edinburgh in process q.flynn@datatables.net
Charde Marshall Regional Director $470,600 San Francisco in process c.marshall@datatables.net
Haley Kennedy Senior Marketing Designer $313,500 London hired h.kennedy@datatables.net
Tatyana Fitzpatrick Regional Director $385,750 London Pending t.fitzpatrick@datatables.net
Michael Silva Marketing Designer $198,500 London in process m.silva@datatables.net
Paul Byrd Chief Financial Officer (CFO) $725,000 New York in process p.byrd@datatables.net
Gloria Little Systems Administrator $237,500 New York hired g.little@datatables.net
Bradley Greer Software Engineer $132,000 London Pending b.greer@datatables.net
Dai Rios Personnel Lead $217,500 Edinburgh in process d.rios@datatables.net
Jenette Caldwell Development Lead $345,000 New York hired j.caldwell@datatables.net
Yuri Berry Chief Marketing Officer (CMO) $675,000 New York Pending y.berry@datatables.net
Caesar Vance Pre-Sales Support $106,450 New York in process c.vance@datatables.net
Doris Wilder Sales Assistant $85,600 Sidney hired d.wilder@datatables.net
Angelica Ramos Chief Executive Officer (CEO) $1,200,000 London Pending a.ramos@datatables.net
Gavin Joyce Developer $92,575 Edinburgh in process g.joyce@datatables.net
Jennifer Chang Regional Director $357,650 Singapore hired j.chang@datatables.net
Brenden Wagner Software Engineer $206,850 San Francisco hired b.wagner@datatables.net
Fiona Green Chief Operating Officer (COO) $850,000 San Francisco Pending f.green@datatables.net
Shou Itou Regional Marketing $163,000 Tokyo in process s.itou@datatables.net
Michelle House Integration Specialist $95,400 Sidney hired m.house@datatables.net
Suki Burks Developer $114,500 London Pending s.burks@datatables.net
Prescott Bartlett Technical Author $145,000 London in process p.bartlett@datatables.net
Gavin Cortez Team Leader $235,500 San Francisco hired g.cortez@datatables.net
Martena Mccray Post-Sales support $324,050 Edinburgh hired m.mccray@datatables.net
Unity Butler Marketing Designer $85,675 San Francisco Pending u.butler@datatables.net
Howard Hatfield Office Manager $164,500 San Francisco in process h.hatfield@datatables.net
Hope Fuentes Secretary $109,850 San Francisco hired h.fuentes@datatables.net
Vivian Harrell Financial Controller $452,500 San Francisco Pending v.harrell@datatables.net
Timothy Mooney Office Manager $136,200 London in process t.mooney@datatables.net
Jackson Bradshaw Director $645,750 New York hired j.bradshaw@datatables.net
Olivia Liang Support Engineer $234,500 Singapore Pending o.liang@datatables.net
Bruno Nash Software Engineer $163,500 London in process b.nash@datatables.net
Sakura Yamamoto Support Engineer $139,575 Tokyo Pending s.yamamoto@datatables.net
Thor Walton Developer $98,540 New York in process t.walton@datatables.net
Finn Camacho Support Engineer $87,500 San Francisco hired f.camacho@datatables.net
Serge Baldwin Data Coordinator $138,575 Singapore Pending s.baldwin@datatables.net
Zenaida Frank Software Engineer $125,250 New York in process z.frank@datatables.net
Zorita Serrano Software Engineer $115,000 San Francisco hired z.serrano@datatables.net
Jennifer Acosta Junior Javascript Developer $75,650 Edinburgh Pending j.acosta@datatables.net
Cara Stevens Sales Assistant $145,600 New York in process c.stevens@datatables.net
Hermione Butler Regional Director $356,250 London hired h.butler@datatables.net
Lael Greer Systems Administrator $103,500 London Pending l.greer@datatables.net
Jonas Alexander Developer $86,500 San Francisco in process j.alexander@datatables.net
Shad Decker Regional Director $183,000 Edinburgh hired s.decker@datatables.net
Michael Bruce Javascript Developer $183,000 Singapore hired m.bruce@datatables.net
Donna Snider Customer Support $112,000 New York hired d.snider@datatables.net
Name Position Salary Office CV Status E-mail Action

Ajax sourced data

DataTables has the ability to read data from virtually any JSON data source that can be obtained by Ajax. This can be done, in its most simple form, by setting the ajax:option option to the address of the JSON data source.
Name Position Office Extn. Start date Salary
Name Position Office Extn. Start date Salary

Javascript sourced data

At times you will wish to be able to create a table from dynamic information passed directly to DataTables, rather than having it read from the document. This is achieved using the data option in the initialisation object, passing in an array of data to be used (like all other DataTables handled data, this can be arrays or objects using thecolumns.data option).A table must be available on the page for DataTables to use. This examples shows an empty table element being initialising as a DataTable with a set of data from a Javascript array. The columns in the table are dynamically created based on the columns.title configuration option.

Server-side processing

There are many ways to get your data into DataTables, and if you are working with seriously large databases, you might want to consider using the server-side options that DataTables provides. With server-side processing enabled, all paging, searching, ordering actions that DataTables performs are handed off to a server where an SQL engine (or similar) can perform these actions on the large data set (after all, that's what the database engine is designed for!). As such, each draw of the table will result in a new Ajax request being made to get the required data.Server-side processing is enabled by setting the serverSide:option option to true and providing an Ajax data source through the ajax:option option.
First name Last name Position Office Start date Salary Action
First name Last name Position Office Start date Salary Action