Okay so the code may need tiding up, maybe someparts in the If syntax may even be redundant but this is what I have and so far it works like a charm for what I wana do.
Im gona do this with a 4 tier table link up structure, so the first Grid is going to be in the biggest panel, the second in the second biggest, the third in the third biggest etc
The first grid-row will see the second grid appearing as though it is "nested" within the expanded row etc
You will need to modify the code to get the panel to dynamically appear lower and lower depending on which row is selected as you go down the records in your Grid,
OR
You will need to autoscroll the selected record you've clicked in the parent grid to the Top of that Grid, that way you wouldnt need to move the Child grids ,,,
Hope this helps someone
I'll post the final thing with an example when its totally done, but again, I still dont know how to export a project lol
Code:
Private Sub dataGridView1_RowHeaderMouseClick(ByVal sender As Object, ByVal e As DataGridViewCellMouseEventArgs) Handles Tbl_DptDataGridView.RowHeaderMouseClick
Me.Tbl_DptDataGridView.SelectionMode = DataGridViewSelectionMode.RowHeaderSelect
Me.txt_Flag.Text = ""
If Me.Tbl_DptDataGridView.Rows(e.RowIndex).Selected = True Then
If Me.Tbl_DptDataGridView.Rows(e.RowIndex).Height <> 300 Then
Tbl_DptDataGridView.Rows(e.RowIndex).Height = 300
Me.Tbl_DptDataGridView.Rows(e.RowIndex).DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopCenter
Me.Panel2.Location = New Point((Panel1.Location.X + 50), (Panel1.Location.Y + 50))
Me.Panel2.Visible = True
Else
Tbl_DptDataGridView.Rows(e.RowIndex).Height = 20
Me.Panel2.Visible = False
End If
Else
End If
End Sub
Bookmarks