title: How to assign gridview column width automatically according to its value in asp.net?
body: <p>I have one GridView which has multiple columns. Here I just mentioned only the two columns in the GridView.</p>
  
  <pre><code>&lt;asp:TemplateField HeaderText="Tot. Qty." ItemStyle-Width="30px" ControlStyle-Width="30px" &gt;
  &lt;ItemTemplate&gt;
        &lt;asp:Label ID="lblTotQty" runat="server" Text='&lt;%# Bind("TotalQuantity") %&gt;'&gt;&lt;/asp:Label&gt;
  &lt;/ItemTemplate&gt;
  &lt;ItemStyle Width="30px" /&gt;
  &lt;ControlStyle Width="30px" /&gt;
  &lt;/asp:TemplateField&gt;
  &lt;asp:BoundField DataField="UoM" HeaderText="UoM" ItemStyle-Width="25px" /&gt;
  </code></pre>
  
  <p>But the problem here is, when the Total Quantity column values is greater than 6 digits. then the value is displays continuously along with the next column value "UoM".
  How to increase the GridView column width of "Total Quantity" according to the Column's value?</p>