Is there a way of changing the sort column in datatable by checking a checkbox ? When I click a "search button" to get data from database, I want the sort to be whatever the checkboxes as checked, like 1 and 3 or only 2 or only 3 and so on.
when i check the box "Nome do Paciente", i want the column "Nome do Paciente" to be the deafult sort for that search.
Documentation OrderBy Filter
The OrderBy Filter can have a collection with the names of columns that you want to order. When you change some check, you can add or remove an element on this array from your controller.
Remmember use this variable in your template. Like this:
The variable
variableOrderBy
has the collection of columns.