find a particular value in the table

find a particular value in the table

dlbarrondlbarron Posts: 23Questions: 1Answers: 0
edited January 2013 in General
I've looked at fnFilter and while it works it does not do what I need.
Basically I want to find out if a particular row exists in the table and if it does not I want to add the row, preferably without going through the entire table. I know what column I want to check against.
I guess I'm looking for something like fnFindRow(column to search in, search value to look for)

While fnFilter works fine, I don't want to see the results of the filtering, I just want to know if the row already exists.

Any chance?

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Use this plug-in: http://datatables.net/plug-ins/api#fnGetColumnData to get the data for the column, and then use $.inArray to check if your value is in the column or not. You can then add the row if needed.

    Allan
This discussion has been closed.