title: How to control column width in gridview?
body: <p>How can I make the GridView auto-resize the width of each column or fix the width of each column in Default.aspx? The problem I'm having is that some columns are too wide and that others are too narrow (data go to the next line).</p>
  
  <pre><code>&lt;div class="divNext"&gt;
      &lt;asp:ScriptManagerProxy ID="DisplayResultsScriptManager" runat="server"&gt;
      &lt;/asp:ScriptManagerProxy&gt;
      &lt;asp:UpdatePanel ID="DisplayResultsUpdatePanel" runat="server" UpdateMode="Conditional"&gt;
          &lt;ContentTemplate&gt;
              &lt;div&gt;
                  &lt;asp:GridView ID="GridViewX" RowStyle-Wrap="false" AllowSorting="true"
                      GridLines="Vertical" OnSorting="GridViewX_Sorting" OnRowDataBound="GridViewX_RowDataBound"
                      runat="server" Height="100" Width="100%" EnableViewState="true"&gt;
                  &lt;/asp:GridView&gt;
              &lt;/div&gt;
              &lt;asp:Timer ID="ResultsTimer" Interval="60000" Enabled="true" runat="server" OnTick="DisplayResultsTimer_Tick"&gt;
              &lt;/asp:Timer&gt;
          &lt;/ContentTemplate&gt;
      &lt;/asp:UpdatePanel&gt;
  &lt;/div&gt;
  </code></pre>