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):

<columnsControls name="columns_controls"/>

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.

  • this might take much efforts as you will have to built this custom by your own. Any specific reason you are not opting for UI component grid in your case? Apr 8, 2020 at 16:56
  • @PatrickW Actually I have already created this custom grid using block and it's running on my client site that's why I want to add this functionality only, do not want to create whole grid again. Apr 8, 2020 at 17:02
  • I understand your situation. Still, I would suggest you to create UI grid for the same if you are displaying data directly from any table and not used multiple joins for that. This will take less time compare to building custom solution to add column controls in the current grid. Also UI grid will be fast and effective compare to simple block grid. Apr 8, 2020 at 17:18
  • @PatrickW Yes I am agree with you but I am looking for possibilities, if there is any. Apr 8, 2020 at 17:36
  • I have implemented this functionality in my project. If anyone need this functionality, they can ask in the comment. May 1, 2020 at 9:45


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.