How to remove rows before serialize?

How to remove rows before serialize?

erik009erik009 Posts: 1Questions: 0Answers: 0
edited June 2012 in General
How does one remove rows where a certain field (textbox) within the row is empty before serializing the DataTable?

I've tried a several methods using jQuery and they either don't work on paginated rows (which are not loaded dynamically) or it fails completely.

This seems to be the most logical.
[code]

$('input[name$="Number"]').each(function() {
if ($(this).val() == "") {
var row = $(this).closest('tr'); // Also tried .parent(); and .parent('tr'); etc.
oTable.fnDeleteRow(row);
}
});

var sData = $('input[value]', oTable.fnGetNodes()).serialize();

[/code]


Thanks for looking.
This discussion has been closed.