Friday, March 9, 2018

column visibility: how to make few columns hidden by default in list view - development

column visibility: how to make few columns hidden by default in list view

I have displayed few column data in view using setColumns method like this:

$this->crud->setColumns([

                    (['name'=>'expire_date','lable'=>'Expire Date']),
                    (['name'=>'username','lable'=>'User']),
                    (['name'=>'prize_id','lable'=>'Prize']), /* New Column(must be hidden by default) */
                    (['name'=>'gifted_from','lable'=>'Gifted From'])  /* New Column(must be hidden by default) */
]);

What I expected to happen:
now in the same list I want to add few more columns to be shown in list view. But by default this columns should be hidden in list view and what I expect that new added hidden columns (in the above list) i can make visible through “column visibility” options provided through $this->crud->enableExportButtons();

Is there any way to do this in laravel backpack?



from Laravel Questions and Answers https://laravelquestions.com/laravel/column-visibility-how-to-make-few-columns-hidden-by-default-in-list-view/
via Lzo Media

No comments:

Post a Comment