我有gridview如下:
<asp:GridView runat="server" ID="gvOverrideData" AutoGenerateColumns="false" AlternatingRowStyle-BackColor="LightGreen" Width="800" OnRowEditing="OverrideGrid_OnRowEditing" OnRowCancelingEdit="OverrideGrid_OnRowCancelingEdit" OnRowUpdating="OverrideGrid_RowUpdating">
<HeaderStyle BackColor="LightGray" />
<Columns>
<asp:TemplateField HeaderText="Path">
<ItemTemplate>
<%# GetOverrideTemplatePath(DataBinder.Eval(Container.DataItem, "Path").ToString())
%>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="FileName" HeaderText="File Name" />
<asp:BoundField DataField="Extension" HeaderText="File Extension" />
<asp:BoundField DataField="FileType" HeaderText="File Type" />
<asp:BoundField DataField="Iteration" HeaderText="Iteration" />
<asp:CommandField ButtonType="Link" ShowEditButton="true" ShowDeleteButton="true"
ShowCancelButton="true" />
</Columns>
</asp:GridView>
我想验证该FileType
字段,使其仅接受 InDesign、XML、CorelDraw、StaticImage 文件类型,其中扩展名应为以下之一
.indd、.tif、.wmf、.idms、.eps、.pdf、.xml、.inds、.emf、.jpg、.cdr、.gif、.ai、.u01
当用户添加/编辑时,如何执行此验证检查?