if (reader.Read()) { listView2.Items.Add(reader["YearLabel"].ToString()); foreach (ListViewItem item1 in listView1.Items) { if (reader.HasRows) { dt.Load(reader); sda.Fill(dt); } int i; for (i = 0; i <= dt.Rows.Count - 1; i++) { listView2.Items.Add(dt.Rows[i].ItemArray[0].ToString()); if (listView2.SelectedItems.Count > 0) { for (i = 0; i <= listView2.Items.Count - 1; i++) { if (listView2.Items[i].Selected == true) { break; } } } //listView2.Items[i].SubItems.Add(dt.Rows[i].ItemArray[1].ToString()); StringBuilder sb = new StringBuilder(); for (i = 0; i < listView2.Items.Count ; i++) { for (int j = 1; j < listView2.Items.Count; j++) { this.listView2.View = View.Tile; if (i == j) { if (listView2.Items[i].Text != listView2.Items[j].Text) { sb.AppendLine(listView1.Items[j].Text); listView2.Items[j].Remove(); } } } } //[...] } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)