MSFlexgrid and merge cells

Nowhere Man
01-17-2005, 02:44 PM
I'm not sure if this is the right forum but I'll try it anyway

I have a flexgrid in my latest project that I want ta appear in kind of the following way

|_____________ |_________________|
|______|______ |________|________|
|______|______ |________|________|
|______|______ |________|________|
|______|______ |________|________|
|______|______ |________|________|

OK It's not extreme ascii art but it does the trick :D . The top row should be a merge of 2 or more columns and then the second row should be the colulns itself so you have this kind of subitems within the big items on the top row. (the first 2 rows would have to be fixed rows.

can anybody help me with this because I can't seem to figure out how to get the mergecells function to work.

thx a lot already

01-17-2005, 03:41 PM
Try something like this to start:

Private Sub Form_Load()
With MSFlexGrid1
.Cols = 4
.FixedCols = 0
.Rows = 6
' Make sure the columns to merge have the same header
.TextMatrix(0, 0) = "Header 1"
.TextMatrix(0, 1) = "Header 1"
.TextMatrix(0, 2) = "Header 2"
.TextMatrix(0, 3) = "Header 2"
.MergeCells = flexMergeRestrictRows
' Merge the data in row 0
.MergeRow(0) = True
End With
End Sub

Nowhere Man
01-17-2005, 04:06 PM
thx Flyguy,

as usual it works like a charm!!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum