FormItemBuilder<T>
Defines the fluent API for configuring the FormItem settings.
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Type Parameters:
T
Syntax:
public class FormItemBuilder<T> where T : class
Inheritance: objectFormItemBuilder<T>
Inherited Members
Constructors
public FormItemBuilder(FormItem settings, ViewContext viewContext, IUrlGenerator generator)
Methods
Defines the field size when grid layout is used. A fixed number defines the colspan for the form field. An array is used to map the colSpan to responsive breakpoints.
public FormItemBuilder<T> ColSpan(Action<FormItemColSpanFactory<T>> configurator)
The action that configures the colspan.
Returns:Defines the field size when grid layout is used.
Maps to the model field which will be configured and sets the name of the input.
public FormItemBuilder<T> Editor(Action<FormItemEditorBuilder<T>> configurator)
Defines the editor widget type. Available options are: DropDown widgets - "AutoComplete", "DropDownList", "ComboBox", "MultiSelect", "DropDownTree", "MultiColumnComboBox"; DatePicker widgets - "DateInput", "DatePicker", "DateTimePicker", "TimePicker"; Input widgets - "TextBox", "TextArea", "NumericTextBox", "MaskedTextBox", "RadioGroup", "CheckBoxGroup", "Switch", "Rating", "Slider", "ColorPicker", "ColorGradient", "ColorPalette", "FlatColorPicker", "hidden" or Editor widget - "Editor".
public FormItemBuilder<T> Editor(string value)
The value that configures the editor.
Returns:Maps to the model field which will be configured and sets the name of the input.
public FormItemBuilder<T> Editor(TemplateBuilder<T> templateBuilder)
The template component that specifies the editor.
Returns:Maps to the model field which will be configured and sets the name of the input.
public FormItemBuilder<T> Editor<TModel>(TemplateBuilder<TModel> templateBuilder)
The template component that specifies the editor.
Returns:The template which the widget will use to create the field editor.
public FormItemBuilder<T> EditorTemplate(string value)
The value that configures the editortemplate.
Returns:The template which the widget will use to create the field editor.
public FormItemBuilder<T> EditorTemplateId(string value)
The value that configures the editortemplate.
Returns:The template which the widget will use to create the field editor.
public FormItemBuilder<T> EditorTemplateView(MvcHtmlString value)
The value that configures the editortemplate.
Returns:Maps to the model field which will be configured and sets the name of the input.
public FormItemBuilder<T> Field(string value)
The value that configures the field.
Returns:Maps to the model field which will be configured and sets the name of the input.
public FormItemBuilder<T> Field<TValue>(Expression<Func<T, TValue>> expression)
The expression that specifies the field, based on the bound model.
Returns:Defines the hint text that will be shown underneath the form editor.
public FormItemBuilder<T> Hint(string value)
The value that configures the hint.
Returns:Defines the field id.
public FormItemBuilder<T> Id(string value)
The value that configures the id.
Returns:Defines the attributes that are applied to the input element.
public virtual FormItemBuilder<T> InputHtmlAttributes(IDictionary<string, object> attributes)
The HTML attributes.
Returns:Defines the attributes that are applied to the input element.
public virtual FormItemBuilder<T> InputHtmlAttributes(object attributes)
The HTML attributes.
Returns:Defines the field label.
public FormItemBuilder<T> Label(Action<FormItemLabelSettingsBuilder<T>> configurator)
The action that configures the label.
Returns:Defines the field label.
Defines the field label.
public FormItemBuilder<T> Name(string value)
The value that configures the label.
Returns:Defines the field title.
public FormItemBuilder<T> Title(string value)
The value that configures the title.
Returns:Defines the type of the item - "fieldset" or "group".
public FormItemBuilder<T> Type(string value)
The value that configures the type.
Returns: