Bind AutoFill to an input not generated by DataTables
Bind AutoFill to an input not generated by DataTables
I'm looking through the docs for a way to do this and haven't seen it yet. It's probably there, I just haven't gotten it working yet.
What I'd like to do is bind the generic autofill trigger to an input elsewhere on the page, not the one auto-generated by DataTables. I'd also like to disable or hide the autofill generated by DataTables, as well as the pagination and "Show N Entires" controls.
I suspect I am just looking in the wrong spot in the docs, and I haven't seen an example that addresses this (yet).
Suggestions?
-Cameron
What I'd like to do is bind the generic autofill trigger to an input elsewhere on the page, not the one auto-generated by DataTables. I'd also like to disable or hide the autofill generated by DataTables, as well as the pagination and "Show N Entires" controls.
I suspect I am just looking in the wrong spot in the docs, and I haven't seen an example that addresses this (yet).
Suggestions?
-Cameron
This discussion has been closed.
Replies
> "Show N Entires" controls.
These two are easy to answer - use the sDom parameter - just remove the two features you don't want. If you want ti disable the features completely, then simply use bPaginate and bInfo .
> What I'd like to do is bind the generic autofill trigger to an input elsewhere on the page
I'm not quite sure what you mean - so a click on a button would fill in a column perhaps? This isn't a feature that is available as part of AutoFill. Instead what would be needed is to loop over the rows/columns you want to update and use the fnUpdate method to put in the data you want.
Allan
As to the other part of my question, what I'm trying to do is essentially eliminate the automagically generated text input "filter" field and instead use another field elsewhere on the page. There is a search text input far away from the table and I'd like *that* text input to serve as the filter field so that when text is typed into that field the table starts to filter based on the input.
-Cameron
Allan
[code]
$('#search-users-input').keyup( function () {
oTable.fnFilter( $(this).val() );
});
[/code]
Thanks for the help!
-Cameron