title: Infragistics Webdatagrid: Resize column to largest header/data cell contents
body: <p>I am searching for a solution that changes the column width based on largest data content or header.
  Solutions like
          tbody.igg_Item > tr > td
          {
              white-space: nowrap !important;
          }
  does not work because the grid sets the column width based on the column header contents not the data, thus the data cell contents is not displayed in its full length.
  e.g if content is "my test data content", I can only see "my test dat" because my header is not long enough.</p>
  
  <p>My markup is:</p>
  
  <pre><code>     &lt;ig:WebDataGrid ID="WebDataGrid1" runat="server" AutoGenerateColumns="False" Height="350px"
           Width="100%"&gt;
           &lt;ClientEvents MouseDown="GridMouseDown" /&gt;
           &lt;Behaviors&gt;
               &lt;ig:Activation&gt;
               &lt;/ig:Activation&gt;
               &lt;ig:ColumnResizing&gt;
               &lt;/ig:ColumnResizing&gt;
               &lt;ig:Selection CellSelectType="Single"&gt;
               &lt;/ig:Selection&gt;
           &lt;/Behaviors&gt;
      &lt;/ig:WebDataGrid&gt;
  </code></pre>
  
  <p>I am adding the columns in code behind (I have not seen any DataColumn property that controls width)</p>