title: VS2008 (Windows CE) auto-resize dataGrid Column width
body: <p>I am using Visual Studio 2008 for a Windows CE 6.0 application.
  For that, I use a dataGrid-Control (not dataGridView!).
  It gets it datasource at runtime as a List, that contains objects of this:</p>
  
  <pre><code>public class lastModified
  {
      public int amount{ get; set; }
      public long coding{ get; set; }
  }
  </code></pre>
  
  <p>That is working well, but the width of both columns is very small, and I can't find an option for the dataGrid to align it 100% to the window.
  Is there a possibility to achieve that?</p>
  
  <p>edit: </p>
  
  <p>is there a way to rename the column-captions? </p>
  
  <p>edit2:</p>
  
  <p>I tried this:</p>
  
  <pre><code>http://www.codeproject.com/Articles/3812/Resizing-Data-Grid-Columns-To-Content
  </code></pre>
  
  <p>which causes a "Invalid Cast Exception"</p>