var oTable1 = $('#Ccctbl').dataTable({ "bPaginate": true, "bDeferRender": true, "bProcessing": true, "bJQueryUI": true, "sDom": '<"toolbar">frtip', "sAjaxSource": "/Setup/LoadCostCenterCategory/", "iDisplayLength": 15, "bDestroy": true, "fnPreDrawCallback": function (oSettings, json) { var id = $(this).attr('id'); $("#ToolTables_" + id + "_0").html("<i class='icon-copy bigger-120 blue'></i>") $("#ToolTables_" + id + "_1").html("<i class='icon-file-text green bigger-120'></i>") $("#ToolTables_" + id + "_0").attr("title", "Copy"); $("#ToolTables_" + id + "_1").attr("title", "Export To Excel"); }, "sDom": "<'row-fluid'<'span6'T><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>", "oTableTools": { "sSwfPath": "//cdn.datatables.net/tabletools/2.2.2/swf/copy_csv_xls.swf", "aButtons": [ { 'sExtends': 'copy', "oSelectorOpts": { filter: 'applied', order: 'current' }, }, { 'sExtends': 'xls', "oSelectorOpts": { filter: 'applied', order: 'current' }, } ] }, "aoColumns": [ { "mData": "CODE", "sTitle": "Cost Center Category Code", "sWidth": "25%", "bSortable": false }, { "mData": "DESCRIPTION", "sTitle": "Description", "sWidth": "25%", "bSortable": false }, { "mData": "strsegcattype", "sTitle": "Segment", "sWidth": "25%", "bSortable": false }, { "mData": "strIsActive", "sTitle": "Active", "sWidth": "25%", "bSortable": false }, ] });
source share