How to search through the child() row? (DataTables 1.10)

How to search through the child() row? (DataTables 1.10)

RagingTrollRagingTroll Posts: 34Questions: 3Answers: 0
edited January 2014 in General
The DataTable().$("selector") only searches the main row, how are we supposed to search through the child()ren?

Replies

  • allanallan Posts: 61,692Questions: 1Answers: 10,102 Site admin
    Two options:

    [code]
    var table = $('#myTable').DataTable();

    $( 'selector', table.rows().nodes() );

    // or

    table.rows().nodes().to$().find( 'selector' )
    [/code]

    Both are 1.10 syntax (since your post referred to that). There will be other ways to do it with `map` / `each` etc as well, but these two are probably the lead code.

    Allan
  • RagingTrollRagingTroll Posts: 34Questions: 3Answers: 0
    Ah got it, thanks! :)
This discussion has been closed.