|
-
Dec 13th, 2006, 07:02 PM
#1
Thread Starter
Addicted Member
Merged cells selection on a MSFlexGrid
I'm a bit lost on this one... when several cells in a FlexGrid are merged both row/col and rowsel/colsel are always pointing to just one of the cells that are part of the merged one, so if you change one of its properties you don't change it for all the cells.
I'd like to know how you'd solve this, since the only methods I can think of right now are using two for loops, or modifying the database fields where these properties are set and reload the grid, and maybe the people with more experience know of some other better way.
-
Dec 13th, 2006, 07:52 PM
#2
Re: Merged cells selection on a MSFlexGrid
-
Dec 13th, 2006, 11:44 PM
#3
Re: Merged cells selection on a MSFlexGrid
 Originally Posted by Neverbirth
When several cells in a FlexGrid are merged both row/col and rowsel/colsel are always pointing to just one of the cells that are part of the merged one, so if you change one of its properties you don't change it for all the cells.
You can do it changing FillStyle property value:
VB Code:
With MSFlexgrid1
.Row = 1
.Col = 1
.RowSel = 5
.ColSel = 3
.FillStyle = flexFillRepeat
'Make your multicell changes here, like..
.CellBackColor = VbYellow
.CellForecolor = VbBlue
.FillStyle = flexFillSingle
End With
-
Dec 14th, 2006, 08:53 AM
#4
Thread Starter
Addicted Member
Re: Merged cells selection on a MSFlexGrid
 Originally Posted by RhinoBull
Thanks for the link, although I don't see any piece of code that gives hints about my problem.
 Originally Posted by jcis
You can do it changing FillStyle property value:
Well, that wouldn't fully solve my problem anyway, since it also requires knowing beforehand where the merged cell begins and where it ends.
Anyway, from reading both replies I guess another method (although not very accurate and could give some problems) would be to change the fillstyle value, select a great amount of cells around the selected one and change the back colour to the ones that have the same original properties, like text, colour, picture, etc. It would be a bit faster that doing two for loops...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|