What is datatables.net-select?
The datatables.net-select package is an extension for the DataTables library that provides row, column, and cell selection capabilities. It allows users to interact with tables by selecting specific parts of the data, which can then be used for further processing or analysis.
What are datatables.net-select's main functionalities?
Row Selection
This feature allows users to select entire rows in a DataTable. The selected rows can then be manipulated or used for further actions.
var table = $('#example').DataTable({
select: true
});
Column Selection
This feature enables users to select entire columns. This can be useful for operations that need to be performed on entire columns of data.
var table = $('#example').DataTable({
select: {
style: 'multi',
items: 'column'
}
});
Cell Selection
This feature allows users to select individual cells within the DataTable. This is useful for more granular data manipulation.
var table = $('#example').DataTable({
select: {
style: 'os',
items: 'cell'
}
});
Multi-Item Selection
This feature allows users to select multiple items (rows, columns, or cells) at once. This is useful for batch operations.
var table = $('#example').DataTable({
select: {
style: 'multi'
}
});
API Integration
This feature provides an API for integrating selection events with custom logic. For example, you can log the data of selected rows.
var table = $('#example').DataTable();
table.on('select', function (e, dt, type, indexes) {
var data = table.rows(indexes).data().toArray();
console.log(data);
});
Other packages similar to datatables.net-select
ag-grid
ag-Grid is a fully-featured and highly customizable JavaScript data grid. It offers similar selection capabilities (row, column, and cell selection) along with a wide range of other features like sorting, filtering, and pagination. Compared to datatables.net-select, ag-Grid is more feature-rich but also more complex to set up.
handsontable
Handsontable is a JavaScript/HTML5 data grid component with Excel-like appearance. It supports row, column, and cell selection, similar to datatables.net-select. Handsontable is particularly well-suited for applications that require a spreadsheet-like interface.
slickgrid
SlickGrid is a JavaScript grid/spreadsheet component that offers high performance and a rich set of features, including row and cell selection. It is highly customizable and can handle large datasets efficiently. Compared to datatables.net-select, SlickGrid is more performance-oriented and suitable for large-scale data.
Select for DataTables
This package contains distribution files for the Select extension for DataTables. Only the core software for this library is contained in this package - to be correctly styled, a styling package for Select must also be included. Styling options include DataTable's native styling, Bootstrap and Foundation.
Select provides table item selection capabilities - rows, columns and cells can be selected individually or collectively. Complex selection operations such as operating system style selection (ctrl/cmd and shift click) for multiple rows can be enabled with a single option for a DataTable.
Installation
Browser
For inclusion of this library using a standard <script>
tag, rather than using this package, it is recommended that you use the DataTables download builder which can create CDN or locally hosted packages for you, will all dependencies satisfied.
npm
npm install datatables.net-select
var $ = require( 'jquery' );
require( 'datatables.net-select' )( window, $ );
bower
bower install --save datatables.net-select
Documentation
Full documentation of the DataTables options, API and plug-in interface are available on the DOCS_LINK. The site also contains information on the wide variety of plug-ins that are available for DataTables, which can be used to enhance and customise your table even further.
Bug / Support
Support for DataTables is available through the DataTables forums and commercial support options are available.
Contributing
If you are thinking of contributing code to DataTables, first of all, thank you! All fixes, patches and enhancements to DataTables are very warmly welcomed. This repository is a distribution repo, so patches and issues sent to this repo will not be accepted. Instead, please direct pull requests to the DataTables/Select. For issues / bugs, please direct your questions to the DataTables forums.
License
This software is released under the MIT license. You are free to use, modify and distribute this software, but all copyright information must remain.