How do I access a specific row with DataTable().row().data() based on text in a specific column?

How do I access a specific row with DataTable().row().data() based on text in a specific column?

yellow_sticky_noteyellow_sticky_note Posts: 2Questions: 1Answers: 0

I have a complicated set of coding where JQuery tabs are integrated heavily with DataTables.
Each tab generates its own DataTable with data.
There is a master DataTable on the main tab that displays an abstract view of all the other tabs.

I load this master DataTable with two columns and populate the first column with the tab titles:
<tr><td>Tab1 Title</td><td></td></tr>
<tr><td>Tab2 Title</td><td></td></tr>
...

Later after the tabs load I am coming back to this master DataTable and populating the second column with the DataTable().page.info().recordsTotal from each of the tab's DataTable.

Since the tab name is in the first column of the master DataTable, I thought I could just search on that column.

I tried finding information on how DataTables stores the data, but I keep getting links to pre 1.10. I kept trying different concoctions of .find() or :contains(), but I have run out of ideas.

Is there an easier way?
Or is there an easy way to get a row based on the contents of a column in the row?

Answers

  • yellow_sticky_noteyellow_sticky_note Posts: 2Questions: 1Answers: 0

    http://datatables.net/reference/type/row-selector was what I needed.
    I sometimes struggle to find what I need on this site.

    I have a suggestion: A master index of references in addition to the groupings under Manual/Reference. Similar to a doxygen/Javadoc output? Does it already exist somewhere?

    I may be showing my age, but there use to be these things called 'books.' Some of them had an 'Index' at the back of them. That's my suggestion.

    I love DataTables, keep up the great work!

This discussion has been closed.