How do I add validation to a GridView field?
<p>I have gridview as follows:</p>

<pre><code>&lt;asp:GridView runat="server" ID="gvOverrideData" AutoGenerateColumns="false" AlternatingRowStyle-BackColor="LightGreen" Width="800" OnRowEditing="OverrideGrid_OnRowEditing" OnRowCancelingEdit="OverrideGrid_OnRowCancelingEdit" OnRowUpdating="OverrideGrid_RowUpdating"&gt;
    &lt;HeaderStyle BackColor="LightGray" /&gt;
    &lt;Columns&gt;
        &lt;asp:TemplateField HeaderText="Path"&gt;
            &lt;ItemTemplate&gt;
                &lt;%# GetOverrideTemplatePath(DataBinder.Eval(Container.DataItem, "Path").ToString())
                %&gt;
            &lt;/ItemTemplate&gt;
        &lt;/asp:TemplateField&gt;
        &lt;asp:BoundField DataField="FileName" HeaderText="File Name" /&gt;
        &lt;asp:BoundField DataField="Extension" HeaderText="File Extension" /&gt;
        &lt;asp:BoundField DataField="FileType" HeaderText="File Type" /&gt;
        &lt;asp:BoundField DataField="Iteration" HeaderText="Iteration" /&gt;
        &lt;asp:CommandField ButtonType="Link" ShowEditButton="true" ShowDeleteButton="true"
        ShowCancelButton="true" /&gt;
    &lt;/Columns&gt;
&lt;/asp:GridView&gt;
</code></pre>

<p>I would like to validate the <code>FileType</code> field, so that it only accepts an InDesign, XML, CorelDraw, StaticImage file type, where the extension should be one of </p>

<blockquote>
  <p>.indd, .tif, .wmf, .idms, .eps, .pdf, .xml, .inds, .emf, .jpg, .cdr, .gif, .ai, .u01</p>
</blockquote>

<p>How can I perform this validation check when a user adds/edit?</p>
