Hi,
I have a column of my flexgrid with the same text in all rows. I would like to merge only two rows. When I set the column with MergeCol to true, all data is merged.
How can I specify the correct rows to merge?
Thanks
Daniel
Printable View
Hi,
I have a column of my flexgrid with the same text in all rows. I would like to merge only two rows. When I set the column with MergeCol to true, all data is merged.
How can I specify the correct rows to merge?
Thanks
Daniel
According to MS all rows are affected by the merge. You may achieve different results by setting MergeCells property but that's about it I guess.
A solution is to add rows to delimit merging zones, you can make this rows invisible to the user with
EDIT: Example..VB Code:
MSFlexgrid1.RowHeight(rownumber) = 0
VB Code:
Private Sub Form_Load() Dim i As Long With MSFlexGrid1 .Rows = 1 .Cols = 3 .MergeCells = flexMergeRestrictColumns .MergeCol(2) = True .ScrollTrack = True .ColAlignment(1) = 4 .ColAlignment(2) = 4 For i = 1 To 20 .AddItem vbTab & i & vbTab & "test" If i Mod 2 = 0 Then .AddItem vbNullString .RowHeight(.Rows - 1) = 0 End If Next End With End Sub
Good idea.
Thank you!