void displaybutton_Click(object sender, EventArgs e) { //Add items in the listview string[] arr = new string[4]; //Add column header listView1.Items.Clear(); List <string> list = new List <string>(); list = db.GetCustomerInfo(); for (int row = 0; row < list.Count; row = row + 3) { arr[0] = list[row]; arr[1] = list[row + 1]; arr[2] = list[row + 2]; Console.WriteLine(list[row] + list[row + 1] + list[row + 2]); itm = new ListViewItem(arr); listView1.Items.Add(itm); } }