Skip to content

Get rows with checked checkbox in a given column #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mrsnax opened this issue Apr 27, 2019 · 3 comments
Open

Get rows with checked checkbox in a given column #94

mrsnax opened this issue Apr 27, 2019 · 3 comments

Comments

@mrsnax
Copy link

mrsnax commented Apr 27, 2019

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

@mpryvkin
Copy link
Member

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 mpryvkin changed the title Get selected index Get rows with checked checkbox in a given column Apr 28, 2019
@sandeepbalagopal09
Copy link

is this feature implemented ?

@mpryvkin
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants