Search Underlying Data

Search Underlying Data

scrwdnetscrwdnet Posts: 2Questions: 1Answers: 0

Hi,

DataTables seems really powerful and flexible to but the one thing I cannot seem to figure out is how to create a custom search input that filters/searches by the underlying row data.

I have a DataTables table that is pulling in data via AJAX but some of the data from the AJAX call isn't displayed in the columns but I'd still like to be able to have a custom select, checkbox, input etc to check against it.

Looking at the API I can see I can extend the search functions but it only appears to give me access to the column data.

Has anyone had any previous experience with this issue and is it possible to achieve. Any help would be appreciated.

Thanks

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,793Questions: 1Answers: 10,513 Site admin
    Answer ✓

    The fourth parameter that is passed in to the custom search functions is the original data object. You can access the data from there.

    Regards,
    Allan

  • scrwdnetscrwdnet Posts: 2Questions: 1Answers: 0

    Ergh - can't believe I didn't see that!

    Thanks for pointing that out to me, much appreciated.

    Thanks
    Sam

This discussion has been closed.