Я пытаюсь удалить входные текстовые поля 1 и 2 в datatable, используя jquery, но когда я удаляю foreach, тогда никакие данные не отображаются
this is my html table code look like this
<table id="vendor" class="table table-bordered table-striped">
<thead>
<tr>
<th>Name</th>
<th>Mobile No</th>
<th>Profession</th>
<th>Updated_at</th>
<th>id</th>
<th>Action</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Name</th>
<th>Mobile No</th>
<th>Profession</th>
<th>Updated_at</th>
<th>id</th>
<th>Action</th>
</tr>
</tfoot>
</table>
, и это мой код данных jquery, в этом коде, когда яудалите foreach, тогда никакие данные не будут отображаться
$(document).ready(function () {
var datatableInstance = $('#vendor').DataTable({
"paging": true,
"pageLength": 10,
"searching":true,
"processing": true,
"serverSide": true,
$('#vendor tfoot th').each(function () {
var title = $('#vendor thead th').eq($(this).index()).text();
$(this).html('<input type="text" class="form-control" placeholder="Search ' + title + '" />');
});
datatableInstance.columns().every(function () {
var dataTableColumn = this;
$(this.footer()).find('input').on('keyup change', function () {
dataTableColumn.search(this.value).draw();
});
});
});
У меня есть этот тип дизайна в имени, доступном для данных, и номер мобильного телефона отсутствует в столбце «не приходят». Входное текстовое поле только входит в столбец профессии