Datatables

From HaFrWiki
Revision as of 17:04, 6 October 2021 by Hjmf (talk | contribs) (Responsive Mode)
Jump to: navigation, search

Datatables are a free library for adding interactive searchable sortable and editable Data inside tables to your website [1]
My earlier websites used Bootgrid (Rafael Staib: http://www.jquery-bootgrid.com) but since this framework was not that stable during a period I decided to move on to Datatables.

Introduction

The Datatables website has many examples and tutorials.
This website is in no way intended to teach Datatables, but gives some tips and hints.

Responsive Mode

The implemented Responsive mode does a good job and is also good manageable.
But sometimes you want to change the way things are going.
First of all when do you want to go in responsive mode.
This snippet shows an example for enabling responsive only for screens smaller than 1080px in width

var dtList = $('#listDT).DataTable( {
   ...
   responsive  : window.innerWidth < 1080 ? true : false,
   ...   
}

See also

top

Reference

top

  1. datatables.net, Datatables home page.