I'm not a VB developer, so I'm not sure how to make a better If statement
here:
Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e
As System.EventArgs) Handles TabControl1.SelectedIndexChanged
If (Not (Me.DataGrid1.Parent Is Nothing)) Then
Me.DataGrid1.Parent.Controls.Remove(Me.DataGrid1)
Me.TabControl1.SelectedTab.Controls.Add(Me.DataGri d1)
End If
End Sub
Anyway, it seems to work fine be handling the "OnSelectedChanged" event of
the TabControl where it removes the DataGrid from its current TabPage and
then adds it to the currently visible TabPage.
"skumar" <sk****@awiware.com> wrote in message
news:06****************************@phx.gbl...
I need to add a datagrid in the Tabcontrol which can be
used in common by all Tabpages.
Right now i have to add datagrid to individual tabpages.
Can anyone help me in this. i just want to add one
datagrid control to tabcontrol which can be used and seen
in all tabpages.
Thanks,
SKumar