Laravel-datatables: enable/disable column order-able or searchable?

Created on 26 Jan 2016  路  5Comments  路  Source: yajra/laravel-datatables

How to enable/disable column order-able or searchable features in Service Implementation?

Thanks.

Most helpful comment

Just set searchable and/or orderable to false like:

->columns([
  'id',
  'action' => ['orderable' => false, 'searchable' => false]
])

All 5 comments

Just set searchable and/or orderable to false like:

->columns([
  'id',
  'action' => ['orderable' => false, 'searchable' => false]
])

great, working as expected. Thanks.

Could you have a look on my comment #341 Thanks.

no found call to a member function getquery() on null

@yajra and @mansouralex Could you please let me know, if this in the documentation, my need is simillar

lets say if my code is

 ->editColumn('created_at', function(Video $video){
            return $video->createdAt();
        })

or in js it is

{ data: 'created_at', name: 'created_at' },
and I want it to disable sorting on it, how I can do it?

{ data: 'created_at', name: 'created_at', orderable: false },

is the solution.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jackrsantana picture jackrsantana  路  3Comments

josiahke picture josiahke  路  3Comments

shadoWalker89 picture shadoWalker89  路  3Comments

t0n1zz picture t0n1zz  路  3Comments

ahmadbadpey picture ahmadbadpey  路  3Comments