C# datatable to listview
foreach (DataRow row in data.Rows)
{
ListViewItem item = new ListViewItem(row[0].ToString());
for (int i = 1; i < data.Columns.Count; i++)
{
item.SubItems.Add(row[i].ToString());
}
listView_Services.Items.Add(item);
}
Update: also, if you're calling your method more than once, you need to either clear the columns collection before adding the columns, or check to see if the columns have already been added - otherwise, the number of columns will keep increasing every time you call your method.