Datatable accordeon
Datatable accordeon
jojo____
Posts: 9Questions: 5Answers: 0
Hi everybody,
I'm trying to make an accordeon inside a datatable but I have no idea how this can be done. I have a datatable listing users. By click on a row (one user), I want to add a row (without columns) and show in there more information about the user. By clicking on another row, the first additionnal disappear and a new one appears under the new selected row with the detailed information about the selected user.
Is this actually possible ?
Thanks !
This discussion has been closed.
Answers
I found something that would be perfect:
function format(d) {
//
d
is the original data object for the rowreturn '
';
}
$(document).ready(
function() {
var table = $('#listOfEmails').DataTable({
"bPaginate" : false,
"oLanguage" : {
"sInfo" : ""
},
"sScrollY" : "400px",
The problem is that this need an ajax entry. I am working with jee and my datatable is filled with an array that I get from my controller. I made a foreach to go through the array and add the rows. Is it still possible without ajax ? :s
If you are just working with DataTables by itself, then you'll probably will want to use JED on the server side to accomplish what you want. I see you're on the Java platform, so getting acquainted with JED is your best option: http://jed-datatables.ca/jed/