Editor - Select rows by specific column
Editor - Select rows by specific column
supportNE
Posts: 23Questions: 7Answers: 0
Hi
I've been looking through the forum and examples, but have been unable to find what I'm looking for.
Taking the standard example, Name, position, office, extension, salary, how would I create a search based upon e.g. office only ?
I'm hoping that someone will have a link to live.datatables.net that already does this.
Many thanks in advance
Justin
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Use
column().search()
for this. Here is an example:http://live.datatables.net/vaxoseti/1/edit
Kevin
That's really cool Kevin, thanks - Any idea how I'd build a select box for the offices ?
Here is an example of creating column select searches.
https://datatables.net/examples/api/multi_filter_select.html
You can limit the columns by using a
selector-modifier
in this line:this.api().columns().every( function () {
. The easiest is to assign a class to theth
tags you want to apply the search and use that as theselector-modifier
.Kevin