Mark an row

Mark an row

Wilmer30Wilmer30 Posts: 33Questions: 10Answers: 1

I try to mark a row with selected but for some reason I do not achieve it.

          var wdts = table.table( this.parentNode.parentNode );
          console.log(wdts);

          if(  wdts.data().any() ){
            console.log(wdts.row(this)); //Here is functional
            wdts.$('tr.selected').removeClass('selected');
            wdts.$(this).addClass('selected');
          }

Thank for you help.

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 63,464Questions: 1Answers: 10,466 Site admin
    Answer ✓

    Use row().select() - assuming you are using the Select extension.

    Allan

  • Wilmer30Wilmer30 Posts: 33Questions: 10Answers: 1

    I use Select extension, but not work.

              var wdts = table.table( this.parentNode.parentNode );
              console.log(wdts.row( this,{ page: 'current' } ).select());
                wdts.row( this,{ page: 'current' } ).select();
    
    
  • Wilmer30Wilmer30 Posts: 33Questions: 10Answers: 1
    Answer ✓

    I found the problem, I worked on a predesigned template, changing all the libraries and leaving the official, the problem was solved.

This discussion has been closed.