proper way to hide/show columns on DBGrid

别等时光非礼了梦想. 提交于 2019-12-02 19:17:11

问题


I am starting new database project, where I have some tables and maybe 20 columns to show in DBGrid at all, but I know it is not possible to show all 20 columns in Grid as it will need too much space. I need such option that user can adjust which columns to show or hide. what would be a easy and proper solution for it? other solutions will also be accepted.

thanks everyone for any help.


回答1:


there are 2 ways.

1st. You are using automatically created dbgrid columns. this mean, that you do not create columns manually and in this case you can change Visible property for the corresponging field in underlying table.

2st. Columns in your DBGrid were created by you manually, and you can change Visible property for the TDbGridColumn itself.



来源:https://stackoverflow.com/questions/24527027/proper-way-to-hide-show-columns-on-dbgrid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!