Access filtered rows
Access filtered rows
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
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
This discussion has been closed.
Replies
[code]
jQuery(oTable.fnGetNodes()).find('td').addClass('editable');
[/code]