title: AutoGenerateColumns Property in GridView
body: <p>Would like know how does <strong>AutoGenerateColumns</strong> Property works in the background for GridView. Suppose if we want to Assign the <strong>HeaderText</strong> property of <strong>TemplateField</strong> in the GridView to the column names from the assigned <strong>DataSource</strong> property of the GridView using <strong>InlineExpression &lt;%# %></strong>. How to do it.</p>
  
  <p>Example: </p>
  
  <pre><code>    &lt;asp:GridView ID="TempGridView" runat="server" DataSourceID="XmlDataSource1" AutoGenerateColumns="false" &gt;
   &lt;Columns&gt;
   &lt;asp:TemplateField HeaderText="{Inline Expression to Get column Name from DataSource}"&gt; 
  &lt;/asp:TemplateField&gt;
   &lt;/Columns&gt;
   &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>Thanks in Advance.</p>