datagrid - Hiding columns in Twwdbgrid - Delphi 7 & Infopower 2000 -



datagrid - Hiding columns in Twwdbgrid - Delphi 7 & Infopower 2000 -

hi building project in after execute query show results in datagrid of twwdbgrid type. question how hide column datagrid, when utilize filtering function.

i searched many days net , tried cast either datagrid or column 1 of parents - inherit - in order find "hide" or "enable"property, didnt' worked.

some people in net suggest work "selected" property of twwdbgrid. complicate solution, specific when want reappear hidden column after canceling filtering action. asking whether there more flexible , easy implement way accomplish task.

thank in advance

as mentioned in comments can set grid's usetfields property true , utilize tfield visible property command display in grid.

for example, supposing had table of contacts title, firstname, lastname , phonenumber.

my query's sqltext property set select * contacts;

i right-click query @ design-time , take 'add fields'.

i have 4 tfield descendants query1title, query1firstname, query1lastname , query1phonenumber.

i can toggle visibility of title displayed in grid writing next code :-

query1title.visible := not query1title.visible;

delphi datagrid

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -