title: How to set border to ItemTemplates in GridView
body: <p>How to set border for ItemTemplates in GridView?</p>
  
  <p>Following is the Gridview code.</p>
  
  <pre><code>&lt;div&gt;
     &lt;asp:GridView ID="GridView1" runat="server" 
      AutoGenerateColumns = "false" Font-Names = "Arial" 
      Font-Size = "11pt" AlternatingRowStyle-BackColor = "#C2D69B"  
      HeaderStyle-BackColor = "green" AllowPaging ="true"   
      OnPageIndexChanging = "OnPaging" OnRowDataBound = "RowDataBound"
      PageSize = "10" &gt;
     &lt;Columns&gt;
      &lt;asp:TemplateField&gt;
          &lt;HeaderTemplate&gt;
              &lt;asp:CheckBox ID="chkAll" runat="server" onclick = "checkAll(this);" /&gt;
          &lt;/HeaderTemplate&gt; 
          &lt;ItemTemplate&gt;
              &lt;asp:CheckBox ID="CheckBox1" runat="server" onclick = "Check_Click(this)"/&gt;
          &lt;/ItemTemplate&gt;
      &lt;/asp:TemplateField&gt; 
      &lt;asp:BoundField ItemStyle-Width = "150px" DataField = "CustomerID" HeaderText = "CustomerID" /&gt;
      &lt;asp:BoundField ItemStyle-Width = "150px" DataField = "City" HeaderText = "City"/&gt;
      &lt;asp:BoundField ItemStyle-Width = "150px" DataField = "Country" HeaderText = "Country"/&gt;
      &lt;asp:BoundField ItemStyle-Width = "150px" DataField = "PostalCode" HeaderText = "PostalCode"/&gt;
     &lt;/Columns&gt; 
     &lt;AlternatingRowStyle BackColor="#C2D69B"  /&gt;
  &lt;/asp:GridView&gt; 
  </code></pre>
  
  <p>All Bounded Fields are getting borders but not the ItemTemplated Fields.</p>