-
May 11th, 2006, 02:43 PM
#1
Thread Starter
Fanatic Member
MsflexGrid Merge Rows
Hi
sorry for my english
I Have a Flexgrid have 5 columns
1) Service
2) Professional
3) Value
4) Qtd
A Service can to be to made for more than a Professional, but Qtd and Value are constants
Then When the user choice more than a Professional , I merge columns Service , Value and Qtd
See Flex1.bmp
But when I Add other Service with Qtd =1 , I do not Want to merge the Atual row with before Rows (See flex2.bmp)
Thank You in Advance
-
May 11th, 2006, 08:01 PM
#2
Thread Starter
Fanatic Member
Re: MsflexGrid Merge Rows
UP
Please How can I to Calculate the Total doing Column 3 * Column 4 withou repeat the Values , because are mescled
-
May 11th, 2006, 08:41 PM
#3
Re: MsflexGrid Merge Rows
Ok, if I understand correctly, the problem is that you don't want to merge column content when rows belong to different items.
You can solve this problem by adding an invisible row between items, to make a row invisible use:
RowHeight(Rownumber) = 0, See this example:
VB Code:
With MSFlexGrid1 'Restrict merge to columns .MergeCells = flexMergeRestrictColumns 'Let's say column 1 can be merged .MergeCol(1) = True 'Add 2 rows that will merge .AddItem vbTab & "hi" .AddItem vbTab & "hi" 'Add an empty row, so merging ends in this row .AddItem "" 'This will make last added row invisible .RowHeight(.Rows - 1) = 0 'Add 2 more rows that will merge .AddItem vbTab & "hi" .AddItem vbTab & "hi" End With
It will be easier if you run that code in another project, in an empty flexgrid, then if it is what you want, add it to your project.
-
May 13th, 2006, 05:06 AM
#4
Thread Starter
Fanatic Member
[RESOLVED] MsflexGrid Merge Rows
-
Nov 7th, 2019, 02:17 AM
#5
Lively Member
Re: MsflexGrid Merge Rows
that's why we need to keep forums like this exist, people around the world could share
-
Nov 7th, 2019, 05:06 AM
#6
Re: MsflexGrid Merge Rows
For not merging a particular row:
Code:
MSFlexGrid1.MergeRow(Index) = False
-
Nov 9th, 2019, 01:44 PM
#7
Re: MsflexGrid Merge Rows
Omg 13 years old thread resurrected lol.
Btw Eduardo's answer is much better! No need to be adding rows to cut merging.
-
Nov 9th, 2019, 05:10 PM
#8
Re: MsflexGrid Merge Rows
 Originally Posted by jcis
Omg 13 years old thread resurrected lol.
Btw Eduardo's answer is much better! No need to be adding rows to cut merging.
But consider that it won't work on all cases, because suppose that there are three rows merged, then you need to start another row group of lets say two rows, if the first one has MergeRow set to false, then it won't merge with the other row.
-
Nov 10th, 2019, 08:31 AM
#9
Lively Member
Re: MsflexGrid Merge Rows
 Originally Posted by Eduardo-
But consider that it won't work on all cases, because suppose that there are three rows merged, then you need to start another row group of lets say two rows, if the first one has MergeRow set to false, then it won't merge with the other row.
well..for some cases..you need to do "extra" coding for checking.. but at least what you did open the "view"
-
Nov 10th, 2019, 08:32 AM
#10
Lively Member
Re: MsflexGrid Merge Rows
 Originally Posted by Eduardo-
But consider that it won't work on all cases, because suppose that there are three rows merged, then you need to start another row group of lets say two rows, if the first one has MergeRow set to false, then it won't merge with the other row.
well..for some cases..you need to do "extra" coding for checking.. but at least what you did open the "view"
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
|