Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / September 2006



Tip: Looking for answers? Try searching our database.

MSFlexGrid Control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Darryl Kirtland - 28 Sep 2006 03:56 GMT
Hello

I have a msflexgrid control which comprises 6 columns and 8 rows (I'm using
Visual Basic 6 ).

In row 4, I need to merge columns 2,3,4,5

In row 6, I need to merge columns 3 and 4.

I've tried a number of ways to do the above, but I still can't get it work.

Any suggestions would be much appreciated

Thanks

Darryl Kirtland
Rick Rothstein (MVP - VB) - 28 Sep 2006 04:35 GMT
> I have a msflexgrid control which comprises 6 columns and 8 rows (I'm
> using Visual Basic 6 ).
[quoted text clipped - 7 lines]
>
> Any suggestions would be much appreciated

Put the data into the grid first, then do the merge stuff. Here is some
sample code...

Dim X As Long
Dim Y As Long
With MSFlexGrid1
 ' Put something in every cell
 For X = 0 To .Rows - 1
   For Y = 0 To .Cols - 1
     .TextMatrix(X, Y) = "Row: " & X & ", Col: " & Y
   Next
 Next
 ' Go back and set the same values in the cells to be merged
 .Row = 4
 For Y = 2 To 5
   .TextMatrix(.Row, Y) = "Same Value 1"
 Next
 .Row = 6
 .TextMatrix(.Row, 2) = "Same Value 2"
 .TextMatrix(.Row, 3) = "Same Value 2"
 ' Now merge the like cells per given row
 .MergeCells = flexMergeFree
 .MergeRow(4) = True
 .MergeRow(6) = True
End With

Rick
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.