How to disable searching in specific DataTable columns?

后端 未结 4 617
面向向阳花
面向向阳花 2021-01-20 16:13

I\'m using successfully this code

function refreshDataTable() {
        // The table is made sortable
        $(\'#order_proposal_table\').DataTable({
              


        
4条回答
  •  猫巷女王i
    2021-01-20 16:47

    I resolved using the columnsDef option.

    The following code disabled search for the specified columns. Exactly what I wanted.

    'columnDefs'        : [         // see https://datatables.net/reference/option/columns.searchable
                    { 
                        'searchable'    : false, 
                        'targets'       : [0,1,4,5,6,7,8,9] 
                    },
                ]
    

提交回复
热议问题