You have taken the code from the free version example.
There is difference between "this" context in the toolbar event listeners between the free version and Pro version.
In Pro version, "this" context variable is the grid instance, hence the error.
Please take help of the Pro example to set up show hide columns:
https://paramquery.com/pro/demos/showhide_columns