Server side processing + Details Column
Server side processing + Details Column
jeanmichelem
Posts: 1Questions: 0Answers: 0
Hi, I have a table that works fine with remote processing.
My problem is that I wanna add a detail section. I followed the example given in http://datatables.net/examples/api/row_details.html.
The problem is that the first column that is supposed to be with the image is overrided by the first column of data from the server, so I would like to let the first column as "it is" and start to fill columns from the second one.
Tech data:
Server returns:
{"sEcho":1,"iTotalRecords":2,"iTotalDisplayRecords":2,"aaData":[{"a":1,"b":3},{"a":1,"b":3}],"sColumns":["a","b"]}
Client code is:
this.table = $("#div").dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource" : that.source,
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"iDisplayLength" : 10,
"aLengthMenu": [[20, 50 , 100, -1], [20, 50, 100, "All"]],
"aoColumns": [{
"mData" : "a",
"sName": "a"
},
{
"mData": "b",
"sName": "b"
}
]
//"aoColumnDefs": []
});
and html is a table with TWO columns a, b. Before I call datatables I create ONE new column (expand) as it is donein the example.
The result is a table with 3 columns. The first column has data I want to be in the second, and the second column has the data of the third. The first column expand image has bee overridden.
CAN ANYBODY HELP ME?
THANKS A LOT !!
JEAN.
My problem is that I wanna add a detail section. I followed the example given in http://datatables.net/examples/api/row_details.html.
The problem is that the first column that is supposed to be with the image is overrided by the first column of data from the server, so I would like to let the first column as "it is" and start to fill columns from the second one.
Tech data:
Server returns:
{"sEcho":1,"iTotalRecords":2,"iTotalDisplayRecords":2,"aaData":[{"a":1,"b":3},{"a":1,"b":3}],"sColumns":["a","b"]}
Client code is:
this.table = $("#div").dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource" : that.source,
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"iDisplayLength" : 10,
"aLengthMenu": [[20, 50 , 100, -1], [20, 50, 100, "All"]],
"aoColumns": [{
"mData" : "a",
"sName": "a"
},
{
"mData": "b",
"sName": "b"
}
]
//"aoColumnDefs": []
});
and html is a table with TWO columns a, b. Before I call datatables I create ONE new column (expand) as it is donein the example.
The result is a table with 3 columns. The first column has data I want to be in the second, and the second column has the data of the third. The first column expand image has bee overridden.
CAN ANYBODY HELP ME?
THANKS A LOT !!
JEAN.
This discussion has been closed.