title: Required field and regular expression validators for the bound field elements inside the grid view
body: <p>Here is my gridview and I have added a command field  <strong>Edit</strong> which will enable to edit the particular values in the grid view.The code is working fine.i just need to know how to add a required field validator and regular expression validator  for  the bound field.
  As far as I know adding a textbox inside item template and then validating using <strong>ControlToValidate =”id”</strong> is possible,but is there any chances of adding required field validator for <strong>Bound Field</strong></p>
  
  <pre><code>     &lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
          DataSourceID="SqlDataSource1" RowStyle-HorizontalAlign="Center"
          style="top: 538px; left: 216px; position: absolute; height: 133px; width: 534px" 
          onrowediting="GridView1_RowEditing" onrowupdating="GridView1_RowUpdating" 
          Visible="False" CellPadding="4" ForeColor="#333333" GridLines="None"&gt;
          &lt;AlternatingRowStyle BackColor="White" /&gt;
          &lt;Columns&gt;
             &lt;asp:TemplateField HeaderText="Sr.No."&gt;
                       &lt;ItemTemplate&gt;
                         &lt;asp:Label ID="lblserial" runat="server"&gt;
                          &lt;/asp:Label&gt;
                            &lt;/ItemTemplate&gt;
                            &lt;/asp:TemplateField&gt;
              &lt;asp:BoundField DataField="FID" HeaderText="Faculty ID" ReadOnly="true"
                  ItemStyle-HorizontalAlign="Center" SortExpression="FID" &gt;
              &lt;ItemStyle HorizontalAlign="Center" /&gt;
              &lt;/asp:BoundField&gt;
              &lt;asp:BoundField DataField="Type" HeaderText="Type" SortExpression="Type" 
                  ItemStyle-HorizontalAlign="Center" &gt;
              &lt;ItemStyle HorizontalAlign="Center" /&gt;
              &lt;/asp:BoundField&gt;
              &lt;asp:BoundField DataField="Date" HeaderText="Date" DataFormatString ="{0:d}" SortExpression="Date" ReadOnly="true"
                  ItemStyle-HorizontalAlign="Center" &gt;
              &lt;ItemStyle HorizontalAlign="Center" /&gt;
              &lt;/asp:BoundField&gt;
              &lt;asp:BoundField DataField="Theme" HeaderText="Theme" SortExpression="Theme" 
                  ItemStyle-HorizontalAlign="Center" &gt;
              &lt;ItemStyle HorizontalAlign="Center" /&gt;
              &lt;/asp:BoundField&gt;
              &lt;asp:BoundField DataField="Duration" HeaderText="Duration" ItemStyle-HorizontalAlign="Center" 
                  SortExpression="Duration" &gt;
              &lt;ItemStyle HorizontalAlign="Center" /&gt;
              &lt;/asp:BoundField&gt;
              &lt;asp:BoundField DataField="Organizer" HeaderText="Role" ItemStyle-HorizontalAlign="Center" 
                  SortExpression="Organizer" &gt;
              &lt;ItemStyle HorizontalAlign="Center" /&gt;
              &lt;/asp:BoundField&gt;
  
  
               &lt;asp:BoundField DataField="Venue" HeaderText="Venue" SortExpression="Venue" ReadOnly="true"
                  ItemStyle-HorizontalAlign="Center"&gt;
              &lt;ItemStyle HorizontalAlign="Center" /&gt;
              &lt;/asp:BoundField&gt;
              &lt;asp:BoundField DataField="UpdateDate" HeaderText="UpdateDate"  DataFormatString ="{0:d}" ReadOnly="true"
                  SortExpression="UpdateDate" /&gt;
              &lt;asp:CommandField ShowEditButton="True" /&gt;
          &lt;/Columns&gt;
           &lt;EmptyDataTemplate&gt;&lt;h3 align="center" style="font-weight: bold; font-size: large"&gt;No Records Found&lt;/h3&gt;&lt;/EmptyDataTemplate&gt;
          &lt;FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" /&gt;
          &lt;HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" /&gt;
          &lt;PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" /&gt;
          &lt;RowStyle BackColor="#FFFBD6" ForeColor="#333333" HorizontalAlign="Center" /&gt;
          &lt;SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" /&gt;
          &lt;SortedAscendingCellStyle BackColor="#FDF5AC" /&gt;
          &lt;SortedAscendingHeaderStyle BackColor="#4D0000" /&gt;
          &lt;SortedDescendingCellStyle BackColor="#FCF6C0" /&gt;
          &lt;SortedDescendingHeaderStyle BackColor="#820000" /&gt;
      &lt;/asp:GridView&gt;
      &lt;asp:SqlDataSource ID="SqlDataSource1" runat="server" 
          ConnectionString="&lt;%$ ConnectionStrings:ProjectConnectionString %&gt;" 
          SelectCommand="SELECT * FROM [WorkshopSC_det] WHERE ([FID] = @FID)"
         UpdateCommand="UPDATE [WorkshopSC_det] SET Duration=@Duration,Organizer=@Organizer WHERE(Theme=@Theme) "&gt;
  
          &lt;SelectParameters&gt;
           &lt;asp:SessionParameter Name="FID" SessionField="FID" Type="String" /&gt;
          &lt;/SelectParameters&gt;
          &lt;UpdateParameters&gt;
          &lt;asp:Parameter Name="Theme"/&gt;
          &lt;asp:Parameter Name="Duration" /&gt;
          &lt;asp:Parameter Name="Organizer" /&gt;
          &lt;asp:Parameter Name="Role" /&gt;
  
  
          &lt;/UpdateParameters&gt;
          &lt;/asp:SqlDataSource&gt;
  </code></pre>