Postingan lainnya
Kelas Premium!
Belajar Javascript untuk website
Gunakan kupon "mulaijs" untuk diskon 75 ribu!
Bagaimana cara menampilkan isi data berdasarkan 'keyword' pencarian saja
saya mengalami stuck pada sesi tampil data berdasarkan 'keyword' pencarian saja, karna jumlah record yang ada terlalu banyak jadi browser cukup terbebani saat me-Load data dari table, saya mengambil langkah untuk menampilkan data berdasarkan 'keyword' yang diketikkan pada searchbox saja. Apakah ada solusinya?
-controller-
public function get_outage() {
if( $this->input->is_ajax_request() )
$user = $this->ion_auth->get_users_groups($_SESSION['user_id'])->row();
{
$this->datatables->select('outage.No as No, outage.*')
// ->unset_column('No')
->add_column('action', get_buttons('$1','outage',$user->id), 'No')
->from('outage');
->where('')
echo $this->datatables->generate();
return FALSE;
}
show_404();
}
-datatable-
$(function() {
$('#datatable').DataTable( {
dom: "Bfrtip",
buttons: [
{
extend: "csv",
className: "btn-sm"
},
{
extend: "excel",
className: "btn-sm"
},
],
"bDestroy": true,
"scrollX": true,
"bProcessing": true,
"sAjaxSource": protocol + "//" + host + "/MPR/outage/get_outage",
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"iDisplayStart ":20,
"oLanguage": {
"sProcessing": "<img style='position: absolute;margin-left: -41%;margin-top: -8px;' src='" + protocol + "//" + host + "/assets/images/ajax-loader.gif'>"
},
"fnInitComplete": function() {
// oTable.fnAdjustColumnSizing();
},
"fnServerData": function(sSource, aoData, fnCallback)
{
$.ajax
({
'dataType': 'json',
'type' : 'POST',
'url' : sSource,
'data' : aoData,
'success' : fnCallback
});
},
"sServerMethod": "POST",
"aoColumns": arrField = [
{
"data": "No",
"visible": false
},
{ "data": "Source" },
{ "data": "TroubleTicket" },
{ "data": "CCID" },
{ "data": "GroupCustomer" },
{ "data": "CustomerName" },
{ "data": "TicketStatus" },
{ "data": "StartDate" },
{ "data": "FinishDate" },
{ "data": "Week" },
{ "data": "Pending" },
{ "data": "HandlingTime" },
{ "data": "MonthOpen" },
{ "data": "MonthClose" },
{ "data": "Downtype" },
{ "data": "RFO" },
{ "data": "Action" },
{ "data": "Tier1" },
{ "data": "Tier2" },
{ "data": "Tier3" },
{ "data": "Tier4" },
{ "data": "Tier5" },
{ "data": "PrioritySegment" },
{ "data": "CustomerLevel" },
{ "data": "SegmentInternal" },
{ "data": "Segment" },
{ "data": "Region" },
{ "data": "Lokasi" },
{ "data": "OpenDate" },
{ "data": "CloseDate" },
{ "data": "Note" },
{ "data": "action" }
],
"order": [[ 0, "desc" ]]
} );
});
Mohon Pencerahannya MasterMaster sekalian.. Terimakasih sebelumnya..
0