Private Sub rad1_CheckedChanged(sender As Object, e As EventArgs) Handles radvet.CheckedChanged
Try
If Not con.State = ConnectionState.Open Then
con.Open()
End If
Dim da As New OleDbDataAdapter
Dim dt As New DataTable
da = New OleDbDataAdapter("SELECT * FROM Purchase1", con)
da.Fill(dt)
DataGridView2.DataSource = dt.DefaultView
DataGridView2.Columns(0).Visible = True
DataGridView2.Columns(1).Visible = True
DataGridView2.Columns(2).Visible = False
DataGridView2.Columns(3).Visible = True
DataGridView2.Columns(4).Visible = True
DataGridView2.Columns(5).Visible = True
DataGridView2.Columns(6).Visible = True
DataGridView2.Columns(7).Visible = False
DataGridView2.Columns(8).Visible = False
DataGridView2.Columns(9).Visible = False
DataGridView2.Columns.Item(0).Width = 150
DataGridView2.Columns.Item(1).Width = 100
DataGridView2.Columns.Item(3).Width = 80
DataGridView2.Columns.Item(4).Width = 100
DataGridView2.Columns.Item(5).Width = 100
DataGridView2.Columns.Item(6).Width = 100
con.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
End Try