laravel-datatables-buttons
laravel-datatables-buttons copied to clipboard
Print Specific Columns. How can I get $excludeFromPrint=[] array value dynamically from colvis. I am using InfyOm generator and Yajra Datatable
Summary of problem or feature request
Print Specific Columns. How can I get $excludeFromPrint=[] array value dynamically from colvis. I am using InfyOm generator and Yajra Datatable
Code snippet of problem
protected $excludeFromPrint = [];
protected function getPrintColumnsFromBuilder()
{
return $this->html()->removeColumn(...$this->excludeFromPrint)->getColumns();
}
System details
- Operating System
- PHP Version
- Laravel Version
- Laravel-DataTables Version
Quick answer, not supported as the colvis button does not support server-side implementation afaik.
However, I think you can create a custom button for this. See https://github.com/yajra/laravel-datatables-buttons/blob/master/src/resources/assets/buttons.server-side.js#L160 for reference.