Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to insert data into a grid by using another grid in vb 6?

Status
Not open for further replies.

Niki_S

Programmer
Jun 4, 2021
232
LK
I have two grids as grid 1 and grid 2. the structure of them is as below,

Code:
grid1
styleno     lineno     garmenttype     startdate     enddate
120         1          pan             2022-01-01    2022-01-05
150         1          skt             2022-03-01    2022-03-10

And what I want is when I'm selecting my first row I want to get my output as below,

Code:
grid2
styleno    operation    lineno    jobno    component    operationno    baserate    sah    operationtype
120        pan          1

For this I did my code as below. But is is not working.
Code:
\Private Sub VSFlexGrid3_Click()
   
   If VSFlexGrid3.Row < 1 Then
   
    Exit Sub
   
   Else
   
    VSFlexGrid1.StyleNo = Trim(VSFlexGrid3.TextMatrix(VSFlexGrid3.Row, 1))
   
   End If
    
End Sub

How can I get my output?

Thank you
 
How do you populate your first grid?
Could you show your code, please?

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson
 
Anything... [ponder]

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top