Edit this page

OnDataFormCreating

The OnDataFormCreating client-side event is raised just before the RadDataForm is created

Two parameters are passed to the event handler:

  • sender - the RadDataForm control that fired the event

  • eventArgs - an event arguments object of type Sys.CancelEventArgs

The following example illustrates how you can handle the OnDataFormCreating event:

 <telerik:RadDataForm RenderMode="Lightweight" runat="server" ID="RadDataForm3">
    <ClientSettings>
        <ClientEvents OnDataFormCreating="onDataFormCreating" />
    </ClientSettings>
</telerik:RadDataForm>
<script type="text/javascript">
 function onDataFormCreating(sender, args) {
     if (!confirm("Create RadDataForm?")) {
         args.set_cancel(true);

         alert("Creating DataForm canceled");
     }
 }
</script>