kendoForm
Namespace: Wisej.Web.Ext.Kendo
Assembly: Wisej.Web.Ext.Kendo (4.1.0.0)
The Kendo UI for jQuery Form is a component, which allows you to generate and manage forms.
- C#
- VB.NET
public class kendoForm : kendoBase
Public Class kendoForm
Inherits kendoBase
Constructors
kendoForm()
Constructs a new instance of the kendoForm class.
Example:
The following example creates a form and lets the widget generate one editor for each field of the data assigned through the Options property.
var form = new kendoForm();
form.Options.formData = new { firstName = "Anna", lastName = "Rossi", newsletter = true };
form.Options.orientation = "horizontal";
form.Dock = DockStyle.Fill;
this.Controls.Add(form);
kendoForm(options)
Constructs a new instance of the kendoForm class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options. |
Example:
The following example creates a form with two required fields and handles the submit event on the server.
var form = new kendoForm(new
{
formData = new { firstName = "", email = "" },
items = new object[]
{
new { field = "firstName", label = "First name", validation = new { required = true } },
new { field = "email", label = "Email", validation = new { required = true, email = true } }
}
});
form.Instance.onSubmit += new WidgetEventHandler((s, e) =>
{
string firstName = e.Data.model.firstName;
AlertBox.Show("Submitted by " + firstName);
});
form.Dock = DockStyle.Fill;
this.Controls.Add(form);