Link to home
Start Free TrialLog in
Avatar of Éric Moreau
Éric MoreauFlag for Canada

asked on

ComponentOne FlexGrid: Merging headers with FixedOnly and details with Spill ?

 How is it possible?

I have a FlexGrid that has a header on 2 lines. Some cols of the first line needs to be merged togheter. This is done easily by setting .AllowMerging = C1.Win.C1FlexGrid.AllowMergingEnum.FixedOnly

Now, I have added a hierarchy in my grid to display the rows grouped by a column. but this group desciption is very long. So I would like like to set .AllowMerging = C1.Win.C1FlexGrid.AllowMergingEnum.Spill

Any demos of that?
 
 
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Eric,

It has been a long time since I used the C1FlexGrid, so it might take a little to get up to speed.  

What version are you using now?

Bob
Avatar of Éric Moreau

ASKER

Hi Bob

I still use 2.1.20033.136
Eric,

All I have is the Community Version from the VB.NET 2003 Resource Kit.  I don't know how much they changed the model for 2.0, but I'll see if I can remember how to do it with the version that I have.

Bob
The version I have is the latest upgrade to the Community Version from the VB.NET 2003 Resource Kit available for free (2003-3 if I am not mistaken). So your version should be almost the same as mine.
It is slowly coming back ;)

If memory serves me correctly, you can only specify AllowMergingEnum.Free or AllowMergingEnum.Spill but not both.  So you could merge the column headers, but not also spill text over to the next empty cell.

Bob
If I am right, we could probably find a way to fake it.

Bob
>>you can only specify AllowMergingEnum.Free or AllowMergingEnum.Spill but not both

That's what I found.

>>If I am right, we could probably find a way to fake it.

That's exactly what I'm looking for!
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
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
I have used your idea of setting the DrawMode to OwnerDraw but I kept AllowMerging to Nodes. Then in the OwnerDrawCell event, using DrawString, I span myself the title over many columns.
Eric,

Any idea that gets what you want is always acceptable.  Glad I could be of a little help.

Bob