Mark an row

Mark an row

Wilmer30Wilmer30 Posts: 31Questions: 9Answers: 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: 43,187Questions: 1Answers: 5,628 Site admin
    Answer ✓

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

    Allan

  • Wilmer30Wilmer30 Posts: 31Questions: 9Answers: 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: 31Questions: 9Answers: 1
    Answer ✓

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

Sign In or Register to comment.