Link to home
Start Free TrialLog in
Avatar of Mahsa60
Mahsa60Flag for Iran, Islamic Republic of

asked on

DBGRID title

hi
i have a question about DBGRID
i have some columns in my dbgrid
i wanna show my columns's  title in 2 line, like this
   --------------------------------------------
   |   project    |  project  |
   |   number   |  name    |
   --------------------------------------------

i wrote this codes but it didnt work
DBGrid2.Columns.Items[0].Title.Caption:='project' + #10 +'number';
what can i do for it

if i want to have my title in 2 seperated line what i must do
   --------------------------------------------
   |           project           |
   --------------------------------------------
   |   number   |  name    |
   --------------------------------------------


plz help me
tanxfull
mahsa
Avatar of Ivanov_G
Ivanov_G
Flag of Bulgaria image

ASKER CERTIFIED SOLUTION
Avatar of Amir Azhdari
Amir Azhdari
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What you will have to do is to inherit from TCustomDBGrid and override the DrawCell procedure and then
modify the DrawTitleCell  procedure to do the multi-line stuff.