Hi all,
I'm trying to validate some fields in a FormTemplate inside of a RadGrid and everything is working fine except for one problem. Whenever the submit button is pressed, an async postback is triggered and after postback the validators are triggered. Functionality wise it works fine, the update/insert isn't persisted, but I don't understand why the post-back is occurring (and causing the ajax loading panel to trigger) instead of the validation occurring all on the client side. Is it possible to prevent the post-back? Form is below and the page is using RadAjaxManager for async. Thanks.
<EditFormSettings EditFormType="Template" CaptionFormatString="Create/Edit Broker" PopUpSettings-Modal="True"> <FormTemplate> <div class="form-template"> <table> <tr> <td>Name</td> <td> <asp:TextBox ID="tbName" runat="server" Text='<%# Bind("NAME") %>'></asp:TextBox> <asp:RequiredFieldValidator ID="rfvName" runat="server" ControlToValidate="tbName" ValidationGroup="form" ErrorMessage="Required!" Display="Dynamic" CssClass="required" /> </td> </tr> <tr> <td>Broker</td> <td> <icl:KeyNameDropDown runat="server" ID="ddlBroker" AppendDataBoundItems="True" /> <asp:RequiredFieldValidator ID="rfvBroker" runat="server" InitialValue="0" ControlToValidate="ddlBroker" ValidationGroup="form" ErrorMessage="Required!" Display="Dynamic" CssClass="required" /> </td> </tr> <tr> <td>Is Active</td> <td> <asp:CheckBox ID="cbActive" runat="server" Checked='<%# Eval("ISACTIVE").ToString().Equals("True") %>' /> </td> </tr> </table> <asp:LinkButton ID="btnUpdate" runat="server" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' ValidationGroup="form" /> </div> </FormTemplate></EditFormSettings>