I like to be able to view datatable in windows form
I managed to get the headers only with ListView how to get the data in there
DataTable data = new DataTable();
data = EnumServices();
//create headers
foreach (DataColumn column in data.Columns)
{
listView_Services.Columns.Add(column.ColumnName);
}
I just want to show now the data in there!
cheers
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.