Home > Software engineering >  Please VB environment, MSHFlexgrid control problem.
Please VB environment, MSHFlexgrid control problem.

Time:10-21

Want to use the effect of the zero line to make MSHFlexgrid is two layers:
| | | this month into the storehouse last month balance
Name | -- -- -- -- -- -- -- -- -- -- -- - | -- -- -- -- -- -- -- -- -- -- -- -- -- - |
| | | amount number number amount of | |
-- -- -- -- -- - | -- - | -- - | -- -- -- -- -- - | -- -- -- -- -- - |
Insurance tube | | | | | 1725.6 21.57 2425.6 30.23
-- -- -- -- -- - | -- - | -- - | -- -- -- -- -- - | -- -- -- -- -- - |
Transformer | 1990 | 199 | 2225 | | 222.5
-- -- -- -- -- - | -- - | -- - | -- -- -- -- -- - | -- -- -- -- -- - |
Thought for a long time, do not to come out, believe there must be a master in the BBS have done, so to learn from you.

CodePudding user response:

For BBS can't upload pictures, so made a hand, who knows, after Posting content is different. Hope you understand this.

CodePudding user response:

BBS can upload pictures

CodePudding user response:


See you the meaning merged cell

CodePudding user response:


 Private Sub Form_Load () 
With MSHFlexGrid1
The Cols=5
. Rows=3
FixedRows=2
. TextMatrix (0, 0)="name"
TextMatrix (1, 0)="name"
. TextMatrix (0, 1)="last month balance
"TextMatrix (0, 2)="last month balance
"TextMatrix (0, 3)="into the warehouse this month
"TextMatrix (0, 4)="into the warehouse this month
"TextMatrix (1, 1)="number"
TextMatrix (1, 2)="amount"
TextMatrix (1, 3)="number"
TextMatrix (1, 4)="amount"
MergeRow (0)=True
MergeCol (0)=True
. MergeCells=flexMergeFree
ColAlignmentFixed (0)=flexAlignCenterCenter
ColAlignmentFixed (1)=flexAlignCenterCenter
ColAlignmentFixed (2)=flexAlignCenterCenter
ColAlignmentFixed (3)=flexAlignCenterCenter
ColAlignmentFixed (4)=flexAlignCenterCenter
The AddItem "insurance tube & amp;" VbTab & amp; "30.23" & amp; VbTab & amp; "1234.55" & amp; VbTab & amp; "123" & amp; VbTab & amp; "365.22", 2
The AddItem "transformers" & amp; VbTab & amp; "30.23" & amp; VbTab & amp; "1234.55" & amp; VbTab & amp; "123" & amp; VbTab & amp; "365.22", 3
End With
End Sub

CodePudding user response:

Teach upstairs, but I thought about you the way; You see insurance tube and transformer is the database of the contents of the recordset, AddItem method to add the record set? Few records can also, but my record in the recordset is hundreds of thousands of article, so your method.

CodePudding user response:

reference 5 floor twy1392336 reply:
thank teach upstairs, but I thought about you the way; You see insurance tube and transformer is the database of the contents of the recordset, AddItem method to add the record set? Few records can also, but my record in the recordset is hundreds of thousands of article, so your method.

This is "around it"...
Others is to demonstrate you, how to "merging" (header format),
How is your data "add", that is you of matter bai...
Is not only a way to put data into MSHFlexgrid control,

CodePudding user response:

Your "data" in the database,
It can also through the circulation and the operation of the record set, the data listed in the control,

CodePudding user response:

Thanks again above two generous help! Article chen8013 back, if the record set of data, to add content to MSHF controls with the circular, speed will be slow? Can directly use the SET MSHFlexgrid1. The DataSource=rs to display? But the starting line is to start with MSHF control line 2, because line 1 to add the "quantity", "amount".
  • Related