[Solved] How split space to fill dataGridView from file .txt in C#


Take look on line string[] Columns = line.Split(‘,’);
You try to split line by comma, but no commas in the file. Try split by space.
Like

string[] Columns = line.Split(' '); 

Or

string[] Columns = line.Split(new []{' '}, StringSplitOptions.RemoveEmptyEntries)

1

solved How split space to fill dataGridView from file .txt in C#