Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //datatables
- table = $('#table-roomtype').DataTable({
- "lengthMenu": [[10, 25, 50, -1], [ 10, 25, 50, "All"]],
- "dom": 'Bfrtip',
- "buttons": [
- /* 'pageLength','copy','csv','excel','pdfHtml5','print' */
- {
- "extend": 'pageLength',
- },
- {
- "extend": 'copy',
- },
- {
- "extend": 'csv',
- },
- {
- "extend": 'excel',
- },
- {
- "extend": 'pdf',
- "orientation": 'landscape',
- "pageSize": 'A4',
- },
- {
- "extend": 'print',
- },
- ],
- "responsive": true,
- "processing": false, //Feature control the processing indicator.
- "serverSide": true, //Feature control DataTables' server-side processing mode.
- "order": [], //Initial no order.
- // Load data for the table's content from an Ajax source
- "ajax": {
- "url": "
- ",
- "type": "POST",
- "data": function ( data ) {
- }
- },
- //Set column definition initialisation properties.
- "columnDefs": [
- {
- "responsivePriority" : 1,
- "targets": [0], //first column / numbering column
- "orderable": false, //set not orderable
- },
- {
- "responsivePriority" : 2,
- "targets": [1], //first column / numbering column
- "orderable": false, //set not orderable
- },
- {
- "responsivePriority" : 3,
- "targets": [2], //first column / numbering column
- "orderable": true, //set not orderable
- },
- {
- "responsivePriority" : 4,
- "targets": [3], //first column / numbering column
- "orderable": false, //set not orderable
- },
- {
- "responsivePriority" : 5,
- "targets": [4], //first column / numbering column
- "orderable": false, //set not orderable
- },
- {
- "responsivePriority" : 6,
- "targets": [5], //first column / numbering column
- "orderable": false, //set not orderable
- },
- {
- "responsivePriority" : 7,
- "targets": [6], //first column / numbering column
- "orderable": false, //set not orderable
- },
- {
- "responsivePriority" : 8,
- "targets": [7], //first column / numbering column
- "orderable": false, //set not orderable
- },
- ],
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement