Answers for "custome lenthchnage in datatable"

0

datatable width column

table.display {
  margin: 0 auto;
  width: 100%;
  clear: both;
  border-collapse: collapse;
  table-layout: fixed;         // add this 
  word-wrap:break-word;        // add this 
}
Posted by: Guest on February-10-2021
0

dataTables lengthMenu

//datatable customization
//#datatable will be replace with your table id or class following jqurey code formet



$('#datatable').dataTable({
       "lengthChange": true,
       "dom": '<"top"i>rt<"bottom"flp><"clear">',
       "lengthMenu": [[10,25, 50, 100, 500, 1000],[10,25, 50, 100, 500, "Max"]],
       "pageLength": 10,
   });
   
   
   

//dom is for changing position of the selecting lentgh menu field
//lengthmenu is for defining ranges 
//pagelenth is the values or entity that will be shown at the time of load #firstview
Posted by: Guest on August-24-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language