title: LINQ and Devexpress Grid Datasource
body: <p>I have a DevExpress grid (DevExpress.XtraGrid.GridControl 8.2) with a datasource set at runtime like so:</p>
  
  <pre><code>private DataContext db = new DataContext("connection string");
  gridControl.DataSource = from t in db.sometable
                            select new
                            {
                                Field1 = t.Name,
                                Field2 = t.Email,
                                Field3 = t.City
                            };
  </code></pre>
  
  <p>This means that the view has no idea what the data is going to look like at design time. I like being able to set a LINQ query as the datasource, but I'd also like to specify what the view will look like at design time.</p>
  
  <ul>
  <li>Is there a way that I can tell the view that it will be using this query?</li>
  <li>Would the best solution be to create a small object for holding the
  contents of what gets returned from
  this query?</li>
  </ul>