Is it possible to hide a listview control column? I want to have the first column hidden but with value held in it. I have Columns like StudentID, Student Name and StudentAddress and i am using StudentID as a primary key that is used to manipulate database. Below is my code. My code given below populates the list view. This function takes the SQL as query string and ListView as the name of the control.
Sub
mylView.Items.Clear()
mylView.Columns.Clear()
sqlCmd.Connection = con
con.Open()
sqlCmd.ExecuteNonQuery()
lvwColumn.Text = dr.GetName(sCtr)
mylView.Columns.Add(lvwColumn)
lvItem.Text = dr(0)
lvItem.SubItems.Add(
lvItem.SubItems.Add(dr.GetString(sCtr))
mylView.Items.Add(lvItem)
dr.Close()
sqlCmd.Dispose()
con.Close()
MsgBox(ex.ToString)