jquery-datatables-checkboxes
jquery-datatables-checkboxes copied to clipboard
Get rows with checked checkbox in a given column
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
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.
is this feature implemented ?
@sandeepbalagopal09 unfortunately, it hasn't been implemented. The only way is to use the workaround suggested in my original reply.