Datatable init complete not working.
Datatable init complete not working.
I could not run the tabloda initcompleted command. and I want to add six inputs to th tags. AJAX does not post after adding Inputs.
HTML:
İsim | Soyisim | Birim Adı | Oluşturma Tarihi | Talep Türü Adı | Talep Durumu Adı |
---|---|---|---|---|---|
Javascript:
var tabLes = $('#gelenBasvurularim').DataTable({
"bServerSide": true,
"bProcessing": true,
"ordering": true,
"sorting": [[0, 'asc']],
"pageLength": 10,
"responsive": true,
"sAjaxSource": "/IncomingApplications/OnayListeleFilter",
"language": {
"url": "/assets/KuveytTurkTasarim/datatable/tr.json"
},
"columnDefs": [
{
visible: true
}
],
"LengthMenu": [
[10, 25, 50, 100, 500, 1000, 9999999],
[10, 25, 50, 100, 500, 1000, 'Tümünü Göster']
],
"select": "single",
"dom": 'lBfrtip',
"lengthChange": true,
"columns": [
{ "data": "BildirimTuruMetni" }
],
"fnDrawCallback": function (oSettings) {
alert("draw call back "+oSettings);
$("#bildirimTables").attr("style", "width: 100%;");
},
"initComplete": function (settings, json) {
alert(1);
$("tfoot tr").appendTo("thead");
$('.search-input-text').on('keyup click',
function () {
console.log("input text");
var i = $(this).attr('data-column');
alert(i);
var v = $(this).val();
alert(v);
$('#gelenBasvurularim').DataTable().columns(i).search(v).draw();
});
$('.search-input-select').on('change',
function () {
var i = $(this).attr('data-column');
var v = $(this).val();
$('#gelenBasvurularim').DataTable().columns(i).search(v).draw();
});
}
});
Script:
<link href="https://nightly.datatables.net/css/jquery.dataTables.css" rel="stylesheet" type="text/css" />