Search a colum

Search a colum

feliblancofeliblanco Posts: 1Questions: 1Answers: 0

Hi, sorry for my english, i'm from argentina.
My ask is, How search a specific column with the search input, because this search all the colums, i need that search only one colum.

I have a table with colums: "ID", "Name", "Price", "Description", where i search by name, but also search others columns

$(document).ready(function() {
$('#instale').DataTable({
    "ordering": false,
    "searching": true
});

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @feliblanco ,

    You can disable searching for specific columns using columns.searchable, this will mean only those columns marked searchable will be tested for a match. If you have your own search control, you can also use the API to search on a specific column with column().search(),

    Cheers,

    Colin

This discussion has been closed.