rows( {selected:true} ) does not return rows

rows( {selected:true} ) does not return rows

maxBmaxB Posts: 2Questions: 1Answers: 0

Link to test case: n/a
Debugger code (debug.datatables.net):

var selectedRows = wavePicksTable.rows('.selected').data().length;
console.log('selectedRows: ' + selectedRows);

wavePicksTable.rows( {selected:true} ).every( function ( rowIdx, tableLoop, rowLoop ) {
    var data = this.data();
    console.log(data);
    sendEDIGeneric(messageData, data);
} );

Error messages shown:
Description of problem:

I do not understand why selectedRows returns 1 when I call the above function but the loop over {selected:true} does not return any rows. What am I missing here?

I am using the package

https://cdn.datatables.net/v/dt/dt-2.1.6/sl-2.0.5/datatables.min.js

Answers

  • maxBmaxB Posts: 2Questions: 1Answers: 0

    Just found the answer myself .. when building the table I forgot to set

    select: {
    style: 'multi'},
    
  • allanallan Posts: 63,602Questions: 1Answers: 10,486 Site admin

    Nice one - thanks for posting back.

    Allan

Sign In or Register to comment.