FormItemBuilder<T>
A fluent interface for configuring a FormItem.
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Type Parameters:
T
Syntax:
public class FormItemBuilder<T>
Inheritance: objectFormItemBuilder<T>
Inherited Members
Constructors
Initializes a new instance of the FormItemBuilder<T> class.
public FormItemBuilder(FormItem container, ViewContext viewContext)
Properties
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:A FormItemBuilder<T> instance that can be used to configure the FormItem.
Defines the field size when grid layout is used.
public FormItemBuilder<T> ColSpan(double value)
A FormItemBuilder<T> instance that can be used to configure the FormItem.
Maps to the model field which will be configured and sets the name of the input.
public FormItemBuilder<T> Editor(Action<FormItemEditorBuilder<T>> configurator)
The expression that specifies the field, based on the bound model.
Returns:A FormItemBuilder<T> instance that can be used to configure the FormItem.
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:A FormItemBuilder<T> instance that can be used to configure the FormItem.
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:A FormItemBuilder<T> instance that can be used to configure the FormItem.
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:A FormItemBuilder<T> instance that can be used to configure the FormItem.
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:A FormItemBuilder<T> instance that can be used to configure the FormItem.
The template which the widget will use to create the field editor.
public FormItemBuilder<T> EditorTemplateHandler(Func<object, object> value)
The value for EditorTemplate
Returns:A FormItemBuilder<T> instance that can be used to configure the FormItem.
The JavaScript function that will return the editor for the field.
public FormItemBuilder<T> EditorTemplateHandler(string value)
The value for EditorTemplate
Returns:A FormItemBuilder<T> instance that can be used to configure the FormItem.
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:A FormItemBuilder<T> instance that can be used to configure the FormItem.
The template which the widget will use to create the field editor.
public FormItemBuilder<T> EditorTemplateView(IHtmlContent templateView)
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:A FormItemBuilder<T> instance that can be used to configure the FormItem.
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:A FormItemBuilder<T> instance that can be used to configure the FormItem.
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:A FormItemBuilder<T> instance that can be used to configure the FormItem.
Defines the field id.
public FormItemBuilder<T> Id(string value)
The value that configures the id.
Returns:A FormItemBuilder<T> instance that can be used to configure the FormItem.
Defines the attributes that are applied to the input element.
public virtual FormItemBuilder<T> InputHtmlAttributes(IDictionary<string, object> value)
The HTML attributes.
Returns:A FormItemBuilder<T> instance that can be used to configure the FormItem.
Defines the attributes that are applied to the input element.
public virtual FormItemBuilder<T> InputHtmlAttributes(object value)
The HTML attributes.
Returns:A FormItemBuilder<T> instance that can be used to configure the FormItem.
Defines the field label.
public FormItemBuilder<T> Label(Action<FormItemLabelSettingsBuilder<T>> configurator)
The action that configures the label.
Returns:A FormItemBuilder<T> instance that can be used to configure the FormItem.
Defines the field label.
public FormItemBuilder<T> Label(string value)
The value that configures the label.
Returns:A FormItemBuilder<T> instance that can be used to configure the FormItem.
Defines the field label.
public FormItemBuilder<T> Name(string value)
The value that configures the label.
Returns:A FormItemBuilder<T> instance that can be used to configure the FormItem.
Defines the field title.
public FormItemBuilder<T> Title(string value)
The value that configures the title.
Returns:A FormItemBuilder<T> instance that can be used to configure the FormItem.
Defines the type of the item - "fieldset" or "group".
public FormItemBuilder<T> Type(string value)
The value that configures the type.
Returns:A FormItemBuilder<T> instance that can be used to configure the FormItem.