Can I span cells in an AdvStringGrid in Delphi?

Hi all,

I need to display a table in a Delphi application where some of the cells are merged (to represent row groups mainly).
How do I achieve this?
If the AdvStringGrid is not possible are there any components that will work better?

Thanks,

James
LVL 4
Member_2_99151Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Emmanuel PASQUIERFreelance Project ManagerCommented:
I don't think you could have merged cells (like in excel) with AdvStringGrid, but you could achieve something close in functionality if not in visual appearance, that is grouping rows based on the value of one column

see here for complete description and code sample :
http://www.tmssoftware.com/site/asg14.asp
Member_2_99151Author Commented:
Hi,

Thanks for the feedback. I have just discovered a property that might do what I am after:

AdvStringGrid1.MergeCells(0,0,1,3);

This should select 0,0 and group 1 wide by 3 deep.

I'll let you know!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Emmanuel PASQUIERFreelance Project ManagerCommented:
ok, excellent ! I intend to buy TMS components one day, they sure looks great. For the moment I only rely on web documentation, so it's difficult to tell what it can do. Let me know if merging cells is working as you wish
Member_2_99151Author Commented:
Hi,
Sorry, forgot to update this post!
What I suggested above appears to work fine. There is a redraw issue on the control which behaves a little strangly when scrollbars are being used, but the overall result is fine.
Member_2_99151Author Commented:
This works fine
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.