Bind multiple arrays to a datagridview
<p>C#, .Net 4, VS2010</p>

<p>I have an object that contains multiple arrays of doubles (recently made them into Lists). It looks something like:</p>

<pre><code>public class Channel
{
    public List&lt;DateTime&gt; Date = new List&lt;DateTime&gt;();  //DateTime
    public List&lt;double&gt; Val1 = new List&lt;double&gt;();      //
    public List&lt;double&gt; Val2 = new List&lt;double&gt;();      //
    public List&lt;double&gt; Val3 = new List&lt;double&gt;();      //
    public List&lt;double&gt; Val4 = new List&lt;double&gt;();      //
}
</code></pre>

<p>So now I'm trying to populate a <code>DataGridView</code> with a <code>DataSource</code>, but I only care about <code>Date</code>, <code>Val1</code>, and <code>Val2</code>.  How can I achieve this?  </p>

<p>Currently I'm looping through the arrays and adding them row by row to the <code>DataGridView</code>.  But this is really slow as I have a huge file of data to work with.  Isn't there an easy way to just bind my arrays and populate the grid?  I can't seem to figure it out.</p>

<p>Thanks</p>

<p>Code I've tried:</p>

<pre><code>Channel ch = new Channel();

List&lt;object&gt; datasource = new List&lt;object&gt;();

dataGridView1.Rows.Clear();
dataGridView1.Columns.Clear();

datasource.Add(ch.spotsList[0].Date);
datasource.Add(ch.spotsList[0].Val1);
datasource.Add(ch.spotsList[0].Val2);

dataGridView1.DataSource = datasource;
</code></pre>

<p>Code I'm using that works but is really slow:</p>

<pre><code>for (int i = 0; i &lt; ch.spotsList[0].Date.Count; i++)
{
    dataGridView1.Rows.Add(ch.spotsList[0].Date[i].ToString("yyyy-MM-dd HH:mm:ss"), ch.spotsList[0].Val1[i].ToString("#.##"), ch.spotsList[0].Val2[i].ToString("#.##"));
}
</code></pre>