Results 1 to 4 of 4

Thread: Merging cells in Flexgrid

  1. #1

    Thread Starter
    Hyperactive Member Jupiter-SL9's Avatar
    Join Date
    Apr 2001
    Location
    Porto Alegre
    Posts
    289

    Merging cells in Flexgrid

    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
    If you want to be loved, first love who God gave to you.

    "Se você quer ser amado, primeiro ame quem Deus te deu"

    (Acts 20:35)

  2. #2

  3. #3
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: Merging cells in Flexgrid

    A solution is to add rows to delimit merging zones, you can make this rows invisible to the user with
    VB Code:
    1. MSFlexgrid1.RowHeight(rownumber) = 0
    EDIT: Example..
    VB Code:
    1. Private Sub Form_Load()
    2. Dim i   As Long
    3.  
    4.     With MSFlexGrid1
    5.         .Rows = 1
    6.         .Cols = 3
    7.         .MergeCells = flexMergeRestrictColumns
    8.         .MergeCol(2) = True
    9.         .ScrollTrack = True
    10.         .ColAlignment(1) = 4
    11.         .ColAlignment(2) = 4
    12.         For i = 1 To 20
    13.             .AddItem vbTab & i & vbTab & "test"
    14.             If i Mod 2 = 0 Then
    15.                 .AddItem vbNullString
    16.                 .RowHeight(.Rows - 1) = 0
    17.             End If
    18.         Next
    19.     End With
    20. End Sub
    Last edited by jcis; Jul 19th, 2006 at 01:39 PM.

  4. #4

    Thread Starter
    Hyperactive Member Jupiter-SL9's Avatar
    Join Date
    Apr 2001
    Location
    Porto Alegre
    Posts
    289

    Re: Merging cells in Flexgrid

    Good idea.
    Thank you!
    If you want to be loved, first love who God gave to you.

    "Se você quer ser amado, primeiro ame quem Deus te deu"

    (Acts 20:35)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width