datatable setup 1

datatable setup

	lengthChange: false, //visable show {row} entries
	info : false, // hide showing entries bottom
    pagingType: "first_last_numbers", // showing bottom number
    searching: false, //hide search
    aLengthMenu: [[5, 10, 25, -1], [5, 10, 25, "All"]], // set show {row} entries
	iDisplayLength: 5 // num of rows

Here is what the above code is Doing:
1. We are using the jQuery DataTables plugin to create a table with pagination, sorting, search etc.
2. We are using the lengthChange option to show the user a dropdown which allows them to select the number of rows they want to see.
3. We are using the info option to hide the “Showing 1 to 10 of 57 entries” text.
4. We are using the pagingType option to display the pagination controls at the bottom of the table.
5. We are using the searching option to hide the search box.
6. We are using the aLengthMenu option to set the number of rows to display in the dropdown.
7. We are using the iDisplayLength option to set the default number of rows to display.

Similar Posts