Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print Specific Columns. How can I get $excludeFromPrint=[] array value dynamically from colvis. I am using InfyOm generator and Yajra Datatable #176

Open
skabirgithub opened this issue Apr 8, 2023 · 1 comment

Comments

@skabirgithub
Copy link

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
@yajra
Copy link
Owner

yajra commented Apr 12, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants