Reputation: 21
how can i create dbgrid with composite columns,
example :dbgrid header | name | | first | last |
Upvotes: 1
Views: 4603
Reputation: 7489
Standard Delphi DBGrid does not support such feature except for Aggregate field type which is supported only in ClientDataset.
You can use 3rd-party grid components that provide such functionality. I personally like EhLib grid which provides this feature, and lots of other ones. Here is a screenshot of EhLib with nested column headers:
(source: ehlib.com)
You can see other screenshots in this link: http://www.ehlib.com/dbgrideh1.htm
Upvotes: 0
Reputation: 2502
You can get such functionality by coding:
Or by paying:
Upvotes: 0
Reputation: 944
The composition should/has to be done on the dataset (table).
If you use a SQL Selects for getting your data, you shoud make the "composition" in the select statement (syntax depends of the data engine/sql server).
You can also make a calculated field on the datasset (look in help and in the examples installed with delphi.
Upvotes: 2