Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82108

How to get cell data from selected columns with a paginated page and colreorder.

$
0
0

I need to build an array of 'types' in jQuery.

The types I need to populated the array are included in a datatable column, I only want to add the selected row's 'types' to the array.

If this wasn't a paginated page I could loop through all the table rows with .selected class, however, because it is this will only get the selected rows for the page you are on, missing the rest on the other pages.

I can't use table.rows( '.selected' ) because this means I need to get the data by array index, but as I am also using colReorder, this index moves around.

I can't add and remove to the array as and when the .tr is clicked because multiple rows can be deselected in one tr click.

Maybe the only way to do it is by including the type column as a non-reorderable column? But is there any other way to achieve this?


Viewing all articles
Browse latest Browse all 82108

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>