jquery-datatables-checkboxes icon indicating copy to clipboard operation
jquery-datatables-checkboxes copied to clipboard

Get rows with checked checkbox in a given column

Open mrsnax opened this issue 5 years ago • 3 comments

Hi,

I love this plugin in. Its the best plugin than original datatables select. My question is how to trying to get selected index of table row not data. It will be used for tr:eq(index?) within selectCallback. Please let me know.

Thank you

mrsnax avatar Apr 27 '19 18:04 mrsnax

Thanks for you kind words.

If you're using client side processing mode, you can use Select extension to retrieve selected rows, for example: var $tr = table.rows( { selected: true } ).nodes().to$(), see Get selected items.

If you're using server-side processing mode, currently there is no easy way to do it. As a workaround you can retrieve selected data with column().checkboxes.selected() API method and then enumerate all rows with rows().every() and compare the selected data with row data. If it matches you can retrieve row's node.

I will need to come up with a new API method to get rows with checked checkbox in a given column or columns.

mpryvkin avatar Apr 28 '19 00:04 mpryvkin

is this feature implemented ?

sandeepbalagopal09 avatar Apr 22 '21 10:04 sandeepbalagopal09

@sandeepbalagopal09 unfortunately, it hasn't been implemented. The only way is to use the workaround suggested in my original reply.

mpryvkin avatar May 13 '21 02:05 mpryvkin