Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Popup FormTemplate validation causing async postback?

$
0
0

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.

<EditFormSettingsEditFormType="Template"CaptionFormatString="Create/Edit Broker"PopUpSettings-Modal="True">
    <FormTemplate>
        <divclass="form-template">
            <table>
                <tr>
                    <td>Name</td>
                    <td>
                        <asp:TextBoxID="tbName"runat="server"Text='<%# Bind("NAME") %>'></asp:TextBox>
                        <asp:RequiredFieldValidatorID="rfvName"runat="server"ControlToValidate="tbName"ValidationGroup="form"ErrorMessage="Required!"Display="Dynamic"CssClass="required"/>
                    </td>
                </tr>
                <tr>
                    <td>Broker</td>
                    <td>
                        <icl:KeyNameDropDownrunat="server"ID="ddlBroker"AppendDataBoundItems="True"/>
                        <asp:RequiredFieldValidatorID="rfvBroker"runat="server"InitialValue="0"ControlToValidate="ddlBroker"ValidationGroup="form"ErrorMessage="Required!"Display="Dynamic"CssClass="required"/>
                    </td>
                </tr>
                <tr>
                    <td>Is Active</td>
                    <td>
                        <asp:CheckBoxID="cbActive"runat="server"Checked='<%#  Eval("ISACTIVE").ToString().Equals("True") %>' />
                    </td>
                </tr>
            </table>
 
            <asp:LinkButtonID="btnUpdate"runat="server"
                Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' ValidationGroup="form" />
        </div>
    </FormTemplate>
</EditFormSettings>

Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>