0

I'm using datatables plugin and i would like add custom search button (Go) to filter the grid which is populated by datatable.When User clicks go button selecting drug and organisation results should be filter

 $(document).ready(function() {
    $('#example').dataTable();
} );

enter image description here

enter image description here

0

1 Answer 1

2

It seems that you want to add multiple custom drop-down filters.

you can do it in this way.

//Call datatable
var table = table =  $('#tableId').DataTable({});

//Call on change event of dropdown and same thing can be done on Go button click
$('#drugDropdownId').on('change', function () {
    //Column number can be changed as per your need
    table.columns(2).search(this.value).draw();
});

Please check for DataTable Search

FYI, please make sure that you're using proper and supported methods of your data-table version.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.