Select extension not working

Select extension not working

HeziHezi Posts: 3Questions: 0Answers: 0

I have a table which I create in js code and to which I insert rows from js in runtime.
Have set the select to true and still the selections are not working (no selected highlights on the rows and no callback fired)
I have checked the attributes of the table (using F12 Chrome Elements) and definitely see the "select=true" there. class of table is display DataTable no footer.

var itemsTable = document.createElement('table');
itemsTable.setAttribute('id', 'itemsDataTbl');  
itemsTable.setAttribute('class', 'display');
itemsTable.setAttribute('select', 'true'); 

Not sure if this should work, but even if I attempt Edit Attribute on the F12 mode and set one of the rows to "selected=true" I still do not see the effect of selection.

Here is a partial list of my imports (scripts and css) on the html page:

<script src="//code.jquery.com/jquery-3.3.1.js"></script>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.socket.io/socket.io-1.4.0.js"></script>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.20/css/jquery.dataTables.css">
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.js"></script>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://www.datatables.net/rss.xml">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css">
<script type="text/javascript" charset="utf8" src=" https://cdn.datatables.net/select/1.3.1/js/dataTables.select.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/select/1.3.1/css/select.dataTables.min.css">
<style type="text/css" class="init"> </style>

Any hints will be mostly welcome...

Replies

This discussion has been closed.