weixin_39631951
weixin_39631951
2020-11-27 17:37

Toggle columns

Hello

Is there a way to toggle columns visibility ? Like having a list of all possible columns, with a checkbox for each, that would allow to hide / show ? I quickly searched in the Columns part of the API reference, but didn't find any option that could toggle column visibility.

Thanx

该提问来源于开源项目:6pac/SlickGrid

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

  • weixin_39927408 weixin_39927408 5月前

    FYI guys, I reworked the column picker to make it more user friendly which I made a PR #159 just a few days ago (you can read the details inside the PR #159).

    I'm also currently working on a Grid Menu (top right corner Grid Menu, which also works better on a touch device I would assume). I hope to make this piece customizable to give flexibility to the user to add custom sub-menus as well (I'm working on the latter now). What I have achieved so far (I basically took the code from my PR #159, so I got the column picker in it), still working on the custom sub-menus part.

    See the result below of what is coming :)

    gridmenu

    点赞 评论 复制链接分享
  • weixin_39927408 weixin_39927408 5月前

    Made PR #160 to add the Grid Menu functionality that I described in earlier post. It also includes an easy way to add custom command in it (for example add a "Clear Filters"). You can see a full description of it on the PR #160

    Additionally, you could give it a try and provide feedback.

    点赞 评论 复制链接分享
  • weixin_39990029 weixin_39990029 5月前

    If you want to hide a column, just remove it from the columns array you call grid.setColumns() again.

    点赞 评论 复制链接分享
  • weixin_39990029 weixin_39990029 5月前

    slick.columnpicker.js Maybe this is what you were looking for. See context menu on grid header http://6pac.github.io/SlickGrid/examples/example-grouping-checkbox-row-select.html

    点赞 评论 复制链接分享
  • weixin_39631951 weixin_39631951 5月前

    -s-barabash slick.columnpicker.js is exactly what I was looking for. Thanx

    点赞 评论 复制链接分享

相关推荐