Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81914

Checkboxes not visible in DataTable second time.

$
0
0

Hi,

i am binding the table using callback by using UpdatePanel.
Once my button click code behind runs completely, i call a script on aspx page using Scriptmanager.ClientScriptblock()...
and in the called java script function i append rows to DataTable.
On first load it adds the checkboxes as first column. but in second time they are not visible and will be shown only when i sort the table. Can some please help.

i am appneding rows to tbody as follows
$("#bodyListLetter tr").remove(); // first removing tr and then add.
$('#bodyListLetter').append(Rows);

Table initialisation code.

if ($.fn.dataTable.isDataTable('#example2')) {
table = $('#example2').DataTable();
}
else {
$('#example2').DataTable({
"searching": false,
"retrieve": false,
"paging": false,
"ordering": true,
"info": false,

                columnDefs: [{
                    orderable: false,
                    className: 'select-checkbox',
                    targets: 0
                }],
                select: {
                    style: 'os',
                    selector: 'td:first-child'
                },
                order: [[1, 'asc']]
            });
        }

Viewing all articles
Browse latest Browse all 81914

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>