Select a row based on specific data in a specific cell

Select a row based on specific data in a specific cell

asbjotveasbjotve Posts: 3Questions: 2Answers: 0

The title says it all, I have found table.row(':contains("Gerard Butler")').select(); earlier.

But, that code will search for "Gerard Butler" in all cells. I want to select a row based on a value in a specified cell, is that posible (maybe with some tweaking of the above code)?

And one other thing, I will use an column with IDs, but it is not visible columnDefs: [{"targets": [0], "visible": false}]

Can Anyone help?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,991Questions: 26Answers: 4,887
    Answer ✓

    Use rows() with a row-selector as a function to choose the rows, from the column, that you are interested in. See the example in the docs.

    Kevin

  • asbjotveasbjotve Posts: 3Questions: 2Answers: 0

    Thanks :) At first, I didn't understand that example, but took me a little time to understand and get it to working :)

Sign In or Register to comment.