Access filtered rows

Access filtered rows

sronsieksronsiek Posts: 52Questions: 11Answers: 0
edited October 2011 in General
Hi,

I have a page containing a DataTable with filtering, plus a drop-down menu.
The data is provided via an ajax request. Following data reception (fnServerData
& fnCallback) I do some post-processing, incl setting cell classes to 'editable'
for use with jeditable:

jQuery('#my_data_table tbody tr').find('td').addClass('editable');

When the drop-down menu selection changes, a table update takes place, the
table is updated using:

oTable.fnClearTable();
oTable.fnAddData( eval(data) );

Now my problem arises when the user has entered a filter string, an update
is requested, and the user then removed the filter string. The previously hidden
rows appear as they should, but without the 'editable' classes.

So the jQuery line above doesn't include filtered out elements. Is there a
DataTables func that can loop through / update (apply a class) to all rows
incl filtered ones?

cheers,
Stefan

Replies

  • sronsieksronsiek Posts: 52Questions: 11Answers: 0
    Reading helps - this seems to do the trick ...

    [code]
    jQuery(oTable.fnGetNodes()).find('td').addClass('editable');
    [/code]
This discussion has been closed.