jQuery DataTables plug-in has lots of useful extensions that let you add extra functionality. Select extension is probably one of the most popular ones providing item selection capabilities. Usually it is used to select table rows or cells but it is capable of column selection as well.

Overview

Columns can be selected using column().select() or columns().select() API methods.

You can enable single or multiple items selection using select.style option.

Selected columns can later be retrieved using the selected extension to the selector-modifier object. For example table.columns( { selected: true } ).data() will get the data of all columns which are selected in the table.

Select columns using table cells

Select columns using checkboxes

Michael Ryvkin

Freelance web developer based in Perkasie, Bucks County, PA. I design and develop custom websites and web applications, perform website maintenance and provide technical support for small and medium-sized businesses.

Contact me for a free quote or consultation on your project.