title: Can I set display name for column while selecting from Database?
body: <p>Is it possible to set the display name for column while selecting from database? This could save me from writing hundrends of lines of code.  Can I do something like..</p>
  
  <pre><code>var alerts = entities.Alerts.Select(x =&gt; new
                      {
                          "Destination IP" = x.destination_ip
                      });
  </code></pre>
  
  <p>This <code>LINQ</code> later gets converted into <code>DataSet</code> to use with <code>ObjectDataSource</code>. <code>DataGrid</code> uses <code>ObjectDataSource</code>. There are DataGrids all over the project and I have to write code to set <code>HeaderText</code> for each column in UI.</p>
  
  <p>Currently I am using <code>BoundField</code> just to set the <code>HeaderText</code>.</p>
  
  <pre><code> &lt;asp:BoundField DataField="destination_ip" HeaderText="Destination IP" /&gt;
  </code></pre>
  
  <p>I don't want to do this extra code. Any other approach would be appreciated.</p>