title: How split space to fill dataGridView from file .txt in C#
body: <p>I need help :-)</p>
  
  <p>I have a file.txt with content like below :</p>
  
  <pre><code>00001    JhonKey     023301923
  00002    Hercules    023039910
  </code></pre>
  
  <p>I want to load this file to datagridview through datatable and the result should be saved in a datagrid like below :</p>
  
  <pre><code>COL1    |    COL2      |  COL3
  -----------------------------------
  00001   |    JhonKey   | 023301923
  00002   |    Hercules  | 023039910
  </code></pre>
  
  <p>I'm trying this code :</p>
  
  <pre><code> using (StreamReader SR = new StreamReader(txtFileName)) 
          {
              int row = 0;
              string line;
              while ((line = SR.ReadLine())!= null)
              {
                  string[] Columns = line.Split(',');
                  dataGridView2.Rows.Add();
                  for (int i = 0; i &lt; Columns.Length; i++)
                  {
                      dataGridView2[i, row].Value = Columns[i];
                  }
                  row++;
              }
          }
  </code></pre>
  
  <p>but the result is not as expected. It looks wrong, everything is wirtten in the first column, shown below : </p>
  
  <pre><code>COL1                         |    COL2      |  COL3
  --------------------------------------------------------
  00001   JhonKey   023301923  |              |
  00002   Hercules  023039910  |              |
  </code></pre>