Select a row based on specific data in a specific cell
Select a row based on specific data in a specific cell
![asbjotve](https://secure.gravatar.com/avatar/463ecd61ea4574d5ef46882765d19a9e/?default=https%3A%2F%2Fvanillicon.com%2F463ecd61ea4574d5ef46882765d19a9e_200.png&rating=g&size=120)
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
Use
rows()
with arow-selector
as a function to choose the rows, from the column, that you are interested in. See the example in the docs.Kevin
Thanks
At first, I didn't understand that example, but took me a little time to understand and get it to working ![:) :)](https://datatables.net/forums/resources/emoji/smile.png)