Advertisement
Guest User

Untitled

a guest
Aug 20th, 2014
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Me.EmployeeTableAdapter.Fill(Me.CaftDatabaseDataSet.Employee)
  2.  
  3.         Dim columns() As String = {"ID", "fname", "lname", "phone"}
  4.  
  5.         For Each col As DataGridViewColumn In dgvMyView.Columns
  6.             For Each header As String In columns
  7.                 Dim y As String = header.ToUpper
  8.                 Dim x As String = col.Name.Substring(0, y.Length).ToUpper
  9.  
  10.                 If (x.Equals(y)) Then
  11.                     col.Visible = True
  12.                     Exit For
  13.                 Else
  14.                     col.Visible = False
  15.                 End If
  16.             Next
  17.         Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement