Datagridview remove all columns
问题 Is it possible in a single hit to remove all columns from a datagrid? I know I could loop though and remove them one by one, or remove the whole thing and create it. But it is possible to simply clear columns and leave the grid in place so users can start fresh. i.e. put it back to its original state. OK here is the code I have private void PopulateGrid() { UserVGrid.AutoGenerateColumns = false; UserVGrid.Columns.Clear(); List<string> _values = populate.GetVaribles; foreach (var line in