0
jqueryデータテーブルを検索する外部入力を設定しようとしています。私はそれが正常に動作し、レンダリングDataTableの検索が、テーブルを検索しません、私のカスタムSearchMe
コントロールを使用してデフォルトを使用する場合は外部入力からMVC jquery datatable検索
<link href="~/Content/DataTables/css/jquery.dataTables.min.css" rel="stylesheet"/>
<link href="~/Content/DataTables/css/select.bootstrap.css" rel="stylesheet"/>
<script src="~/Scripts/DataTables/jquery.dataTables.min.js"></script>
<script src="~/Scripts/DataTables/dataTables.select.min.js"></script>
<script type="text/javascript">
$(document)
.ready(function() {
var sfTable = $('#sfTable')
.dataTable({
"ajax": {
"url": "/Search/LoadData",
"type": "GET",
"datatype": "json"
},
"columns": [
{ "data": "Id", "autoWidth": true },
{ "data": "Name", "autoWidth": true },
{ "data": "Address", "autoWidth": true }
],
"searching": true,
"select": true
});
$('#searchMe')
.on('keyup',
function() {
sfTable.search(this.value).draw();
});
});
</script>
<input id="searchMe" type="text"/>
<table id="sfTable" class="table table-condensed">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Address</th>
</tr>
</thead>
</table>
:私の見解コードを参照してください。私の最終的な目標は、単一の入力から検索される2つのデータテーブルを持つことです。
ここにあります! [link](https://stackoverflow.com/questions/5990386/datatables-search-box-outside-datatable?noredirect=1&lq=1) –