How to manage datatable rows?
How to manage datatable rows?

Dears,
I’ve been testing the extension functionality of datatable and i noticed that it works perfectly.
I wanted to ask the community if any article exists or if someone knows how can I handle the datatable that are “selected”. I understand that the table is an array and I would want to generate a new one but only with selected data in order to process them.
Attentive to any contribution.
Thank you very much
Diego.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Are you using the Select Extension? If so this example shows how to use the API to get the selected rows.
Kevin
First of all, thank you for your answer.
Yes, I'm using the Select Extension option.
I was reading the article you shared me and it was really helpful.
However I have a doubt: Is the following function return an object array?
- "table.rows( { selected: true } );"
I want to use the selected rows data as an object array. Is it possible?
Thanks in advance.
Yes,
rows()
returns an API instance with all the rows. You can chain thetoArray()
API to get a Javascript array.Kevin
Perfect!!! That's excactly what I need it!
I noticed that this sentences also permit us to get an array of the selected ítems.