J
jdrott1
i have a tab named tEmployeeInfo. when the tab is clicked i want to
load a datagridview on the same form, but it is not in the tab
control. i can use this code in the form load event and the datagrid
will populate, but it will not populate if i change it to the
tEmployeeInfo_Click: (when the tab is clicked i want it to load this
data in the grid)
Private Sub tEmployeeInfo_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles tEmployeeInfo.Click
Dim taCashier As New
dsEmployee_EntryTableAdapters.GetTable_CashierInfloTableAdapter
Dim CashierDetails As New
dsEmployee_Entry.GetTable_CashierInfloDataTable
taCashier.Fill(CashierDetails)
'Me.dataGrid1.DataSource = Nothing
Me.dataGrid1.DataSource = CashierDetails
End Sub
load a datagridview on the same form, but it is not in the tab
control. i can use this code in the form load event and the datagrid
will populate, but it will not populate if i change it to the
tEmployeeInfo_Click: (when the tab is clicked i want it to load this
data in the grid)
Private Sub tEmployeeInfo_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles tEmployeeInfo.Click
Dim taCashier As New
dsEmployee_EntryTableAdapters.GetTable_CashierInfloTableAdapter
Dim CashierDetails As New
dsEmployee_Entry.GetTable_CashierInfloDataTable
taCashier.Fill(CashierDetails)
'Me.dataGrid1.DataSource = Nothing
Me.dataGrid1.DataSource = CashierDetails
End Sub