Child rows (show extra / detailed information)

The DataTables API has a number of methods available for attaching child rows to a parent row in the DataTable. This can be used to show additional information about a row, useful for cases where you wish to convey more information about a row than there is space for in the host table.
The example below makes use of the row().childDT methods to firstly check if a row is already displayed, and if so hide it (row().child.hide()DT), otherwise show it (row().child.show()DT). The content of the child row is, in this example, defined by the formatDetails() function, but you would replace that with whatever you wanted to show the content required, possibly including, for example, an Ajax call to the server to obtain the extra information to show.
NamePositionOfficeSalary


Zorita SerranoSoftware EngineerSan Francisco$115,000
Zenaida FrankSoftware EngineerNew York$125,250
Yuri BerryChief Marketing Officer (CMO)New York$675,000
Vivian HarrellFinancial ControllerSan Francisco$452,500
Unity ButlerMarketing DesignerSan Francisco$85,675
Timothy MooneyOffice ManagerLondon$136,200
Tiger NixonSystem ArchitectEdinburgh$320,800
Thor WaltonDeveloperNew York$98,540
Tatyana FitzpatrickRegional DirectorLondon$385,750
Suki BurksDeveloperLondon$114,500
Other examples

Comments

Popular posts from this blog

Bootstrap Tags Input

Eloqent Usage