Control 'dgDisplay' accessed from a thread other than the thread it was created on with Parallel.for
<p>I get an error trying to use Parallel.For</p>

<pre><code>for (int i = 0; i &lt;= count; i++)
{
  DataGridViewTextBoxColumn columnDataGridTextBox = new DataGridViewTextBoxColumn();
  columnDataGridTextBox.Name = fileDataField[i];
  columnDataGridTextBox.HeaderText = fileDataField[i];
  columnDataGridTextBox.Width = 120;
  dgDisplay.Columns.Add(columnDataGridTextBox);
}
</code></pre>

<p>my code with paraller.for</p>

<pre><code>Parallel.For(0, count, i =&gt;
{
  DataGridViewTextBoxColumn columnDataGridTextBox = new DataGridViewTextBoxColumn();
  columnDataGridTextBox.Name = fileDataField[i];
  columnDataGridTextBox.HeaderText = fileDataField[i];
  columnDataGridTextBox.Width = 120;
  dgDisplay.Columns.Add(columnDataGridTextBox); &lt;&lt;&lt; this error add colums
});
</code></pre>
