TelaEmawJew
New Member
I have gridview as follows:\[code\]<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>\[/code\]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 \[quote\] .indd, .tif, .wmf, .idms, .eps, .pdf, .xml, .inds, .emf, .jpg, .cdr, .gif, .ai, .u01\[/quote\]How can I perform this validation check when a user adds/edit?