Since: DataTables 1.10.8

Get the ids of the selected rows.


This method can be used to get the id's of the rows selected by the rows() method, as specified by the row's data and the rowId option. Optionally it can also prepend a hash (#) to the ids allowing them to then easily be used as selectors.

Important This method does not read the DOM id for the tr elements, but rather gets the row id from the row's data source (location specified by rowId).


function rows().ids( [ hash ] )


Get the ids of the selected rows.


Api instance with the selected rows in its result set. If a row does not have an id available undefined will be returned as the value.


The following options are directly related and may also be useful in your application development.