private void lvRemoteDB_Click(object sender, EventArgs e) { string dbName = lvRemoteDB.SelectedItems[0].Text; lvRemoteTable.Items.Clear(); List <string> lTable = mySql.GetTableName(dbName); foreach (var item in lTable) { ListViewItem lvitem = lvRemoteTable.Items.Add(item); lvitem.Tag = item; lvitem.SubItems.Add(item); } }