title: Set gridview's column width
body: <p>I have gridview as follows:</p>
  
  <p><img src="https://i.stack.imgur.com/eLSAQ.png" alt="enter image description here"></p>
  
  <p>But when i enters any larger with text in it, its column with gets increased as follows:</p>
  
  <p><img src="https://i.stack.imgur.com/cLmZZ.png" alt="enter image description here"></p>
  
  <p>In this we can see that when i have entered large text English Question column's with has got effected.</p>
  
  <p>I wanted to keep it fix.</p>
  
  <p>For that i added   <code>&lt;ItemStyle  HorizontalAlign="Left" Width="45%"   /&gt;</code>  in grid's templatefield</p>
  
  <p>but its not working. I also made <code>wrap="true"</code> for label. but no effect on result.</p>
  
  <p>For more clarity my whole code for grid is as follows:</p>
  
  <pre><code>  &lt;asp:GridView ID="GrdQuestions" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                          CssClass="NormalText" PageSize="100" Width="100%"&gt;
                          &lt;HeaderStyle CssClass="TableHeadingNormal TableAlt2" HorizontalAlign="Center" /&gt;
                          &lt;RowStyle CssClass="AltColor21" /&gt;
                          &lt;AlternatingRowStyle CssClass="AltColor22" /&gt;
                          &lt;Columns&gt;
                              &lt;asp:TemplateField HeaderText="SrNo" HeaderStyle-HorizontalAlign="Center"&gt;
                                  &lt;ItemTemplate&gt;
                                      &lt;asp:Label ID="lblID" runat="server" Text='&lt;%# Bind("SrNo") %&gt;'&gt;&lt;/asp:Label&gt;
                                      &lt;asp:Label ID="lblQMID" runat="server" Text='&lt;%# Bind("QMId") %&gt;' Visible="false"&gt;&lt;/asp:Label&gt;
                                  &lt;/ItemTemplate&gt;
                                  &lt;HeaderStyle HorizontalAlign="Center" /&gt;
                                  &lt;ItemStyle HorizontalAlign="Center" Width="3%" /&gt;
                              &lt;/asp:TemplateField&gt;
                              &lt;asp:TemplateField HeaderText="English Question"&gt;
                                  &lt;EditItemTemplate&gt;
                                      &lt;asp:TextBox ID="txtEnglish" runat="server" Text='&lt;%# Bind("English") %&gt;'&gt;&lt;/asp:TextBox&gt;
                                  &lt;/EditItemTemplate&gt;
                                  &lt;ItemTemplate&gt;
                                      &lt;asp:Label ID="lblEnglish" runat="server" Text='&lt;%# Bind("English") %&gt;'&gt;&lt;/asp:Label&gt;
                                      &lt;%--
                                     &lt;%# Eval("English") %&gt;--%&gt;
                                  &lt;/ItemTemplate&gt;
                                  &lt;HeaderStyle /&gt;
                                  &lt;ItemStyle HorizontalAlign="Left" Width="45%" Wrap="true" /&gt;
                              &lt;/asp:TemplateField&gt;
                              &lt;asp:TemplateField HeaderText="Spanish Question"&gt;
                                  &lt;EditItemTemplate&gt;
                                      &lt;asp:TextBox ID="txtSpanish" runat="server" Text='&lt;%# Bind("Spanish") %&gt;'&gt;&lt;/asp:TextBox&gt;
                                  &lt;/EditItemTemplate&gt;
                                  &lt;ItemTemplate&gt;
                                      &lt;asp:Label ID="lblSpanish" runat="server" Text='&lt;%# Bind("Spanish") %&gt;'&gt;&lt;/asp:Label&gt;
                                      &lt;%-- &lt;%#Eval("Spanish")%&gt;--%&gt;
                                  &lt;/ItemTemplate&gt;
                                  &lt;ItemStyle HorizontalAlign="Left" Width="45%" Wrap="true" /&gt;
                              &lt;/asp:TemplateField&gt;
                              &lt;asp:TemplateField ShowHeader="False" HeaderStyle-HorizontalAlign="Center"&gt;
                                  &lt;EditItemTemplate&gt;
                                      &lt;asp:LinkButton ID="LBUpdate" runat="server" CausesValidation="True" CommandName="Update"
                                          Text="Update"&gt;&lt;/asp:LinkButton&gt;
                                      &amp;nbsp;&lt;asp:LinkButton ID="LBCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                                          Text="Cancel"&gt;&lt;/asp:LinkButton&gt;
                                  &lt;/EditItemTemplate&gt;
                                  &lt;ItemTemplate&gt;
                                      &lt;asp:LinkButton ID="LBEdit" runat="server" CausesValidation="False" CommandName="Edit"
                                          Text="Edit"&gt;&lt;/asp:LinkButton&gt;
                                      &lt;asp:LinkButton ID="LinkButton4" runat="server" CausesValidation="False" CommandArgument='&lt;%# Bind("SrNo") %&gt;'
                                          CommandName="Delete" Text="Delete"&gt;&lt;/asp:LinkButton&gt;
                                  &lt;/ItemTemplate&gt;
                                  &lt;ItemStyle HorizontalAlign="Center" /&gt;
                                  &lt;HeaderStyle HorizontalAlign="Center" /&gt;
                              &lt;/asp:TemplateField&gt;
                          &lt;/Columns&gt;
                      &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>Please help me.</p>