Target select dropdown element, created outside initComplete
Target select dropdown element, created outside initComplete

I have a few columns class="list", which use select box as element for filtering the rows.
Now, I'm trying to fill all these selects with distinct column values.
How can I access the column if select is created outside the init function?
initComplete: function () {
this.api().columns([6]).every( function () {
var column = this;
// select = selector of this column select box
column.data().unique().sort().each( function ( d, j ) {
//select.append( '<option value="'+d+'">'+d+'</option>' );
});
});
}
This discussion has been closed.
Answers
Not sure I totally understand your question. Do you mean how do you add the filters to only the columns with the class "list"? Assuming you are using the second
thead
for the selects this example should help you get started:http://live.datatables.net/saqozowe/70/edit
Kevin