How can i make selecting of cell only
How can i make selecting of cell only
Can some one help me with the following problem:
I can not achieve the cell selection.
My table initialisation looks like this:
$('#newTable').DataTable(
{
"scrollY": "220px",
"scrollCollapse": true,
"bPaginate": true,
"paging": false,
"ordering": false,
"bFilter": false,
"info": false,
"bAutoWidth": false,
"bLengthChange": false,
"data": arr,
columns:
[
{ title: "A", "width": "20%" },
{ title: "B", "width": "10%" },
{ title: "C", "width": "10%" },
{ title: "D", "width": "10%" },
{ title: "E", "width": "10%" },
{ title: "F", "width": "10%" },
{ title: "G", "width": "10%" },
{ title: "H", "width": "10%" }
],
"columnDefs":
[
{"className": "dt-center", "targets": "_all"}
],
select
{
style: 'single'
}
In the <head>
I got a lot of script and this one too
But when I click on a cell it still select the entire row instead.
What I am doing wrong with this.
This question has an accepted answers - jump to answer
Answers
I fixed it with this:
select:
{
style: 'os',
items: 'cell'
}
Thanks anyway