how can i create dbgrid with composite columns,
example :dbgrid header | name | | first | last |
how can i create dbgrid with composite columns,
example :dbgrid header | name | | first | last |
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.
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:
You can see other screenshots in this link: http://www.ehlib.com/dbgrideh1.htm
You can get such functionality by coding:
Or by paying: