title: Binding an ASP.NET GridView Control to a string array
body: <p>I am trying to bind an ASP.NET <code>GridView</code> control to an <code>string</code> array and I get the following item:</p>
  
  <blockquote>
    <p>A field or property with the name
    'Item' was not found on the selected
    data source.</p>
  </blockquote>
  
  <p>What is correct value I should use for DataField property of the asp:BoundField column in my GridView control.  Here is my source code:</p>
  
  <p>ASPX page</p>
  
  <pre><code>&lt;asp:GridView ID="MyGridView" runat="server" AutoGenerateColumns="false"&gt;
      &lt;Columns&gt;
          &lt;asp:BoundField DataField="Item" /&gt;
          &lt;asp:CommandField ButtonType="Link" ShowSelectButton="true" SelectText="Click Me!" /&gt;
      &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>Code Behind:</p>
  
  <pre><code>string[] MyArray = new string[1];
  MyArray[0] = "My Value";
  MyGridView.DataSource = MyArray;
  MyGridView.DataBind();
  </code></pre>
  
  <p><b>UPDATE</b></p>
  
  <p>I need to have the <code>AutoGenerateColumns</code> attribute set to <code>false</code> because I need to generate additional <code>asp:CommandField</code> columns.  I have updated my code sample to reflect this scenario</p>