I need a validator in my gridview.
When the user update a field in the gridview, I need to check if the email is valid.
How can I do that?
Below is my gridview.
Please help. Thanks!
Expand|Select|Wrap|Line Numbers
- <asp:GridView ID="gv_retrieve" runat="server" AutoGenerateColumns="False" CellPadding="3"
- ForeColor="Black" GridLines="Vertical" Width="751px" OnRowEditing="gv_retrieve_RowEditing"
- OnRowUpdating="gv_retrieve_RowUpdating" onRowCancelingEdit = "gv_retrieve_RowCancelingEdit"
- OnRowDeleting = "gv_retrieve_RowDeleting" OnRowDataBound = "gv_retrieve_RowDataBound"
- BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" Font-Bold="False">
- <FooterStyle BackColor="#CCCCCC" />
- <Columns>
- <asp:BoundField DataField="Name" HeaderText="Name" />
- <asp:BoundField DataField="Designation" HeaderText="Designation" />
- <asp:BoundField DataField="Email" HeaderText="Email Address" />
- <asp:BoundField DataField="WatcherEmail" HeaderText="Watcher Email" />
- <asp:CommandField ShowEditButton="True" >
- <ItemStyle Width="35px" />
- </asp:CommandField>
- <asp:CommandField ShowDeleteButton="True" />
- <asp:BoundField DataField="apid">
- <ItemStyle CssClass="hiddencol" />
- </asp:BoundField>
- </Columns>
- <EmptyDataTemplate>
- <table width="100%">
- <tr style="font-weight:bold; text-decoration:underline" align="center">
- <td>
- Name
- </td>
- <td>
- Designation
- </td>
- <td>
- </td>
- <td>
- WatcherEmail
- </td>
- </tr>
- </table>
- <br />
- </EmptyDataTemplate>
- <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
- <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
- <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
- <AlternatingRowStyle BackColor="#CCCCCC" />
- </asp:GridView>