Zend certified PHP/Magento developer

Magento 2: How to implement columnControls(hide/show) functionality in custom admin grid

Here I have created a custom grid(inside admin) using block, now I want to add controlColumns(hide/show) functionality in this custom grid.
Using Ui Component, it’s easy to add this functionality by using below code (in grid listing page):


But I want to add this functionality in custom grid which is made using block.

I am also attaching a image file with reference of this problem.

enter image description here

Please give me an idea that how can I achieve it. Any help will be appreciated.