Selector Extension // addClass?

Selector Extension // addClass?

GeaGea Posts: 33Questions: 13Answers: 1

Hello all, i have a question with selector extension:
Can i get the class of a row?
something like:
<code>
var data = table
.rows()
.data();
var id = 0;
tr = data.row(id);
tr.addClass('selected');
</code>
Is this possible?
If my code is wrong, how can i do?
Thanks u all :)

Answers

  • allanallan Posts: 61,744Questions: 1Answers: 10,111 Site admin

    Use the row().select() method to select the row. See the Select documentation.

    Allan

  • GeaGea Posts: 33Questions: 13Answers: 1

    Can i get a row using his id? like:

     row(id, {selected:true})
    
    

    or something like that.
    Thanks.
    Gea.

  • GeaGea Posts: 33Questions: 13Answers: 1

    I must say that i can't use on click function in this part of my proyect.
    That's why i get problems.

  • allanallan Posts: 61,744Questions: 1Answers: 10,111 Site admin

    Yes you can do that. If it isn't working for you I'd need a link to a test page showing the issue.

    Allan

This discussion has been closed.