ListBox
Definition
Namespace:Kendo.Mvc.UI
Assembly:Kendo.Mvc.dll
Syntax:
public class ListBox : WidgetBase, IWidget, IHtmlAttributesContainer, IScriptableComponent
Inheritance: objectWidgetBaseListBox
Implements:
Inherited Members
Constructors
public ListBox(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
Properties
If set to false, the widget will not bind to the data source during initialization. In this case, the data binding will occur when the change event of the data source is fired. By default, the ListBox will bind to the data source that is specified in the configuration.
public bool? AutoBind { get; set; }
The id of the target ListBox to which items from the source ListBox will be transferred and vice versa. If you have to transfer items from the target ListBox over its toolbar, then you also need to set its connectWith option.
public string ConnectWith { get; set; }
public DataSource DataSource { get; }
public string DataSourceId { get; set; }
The field of the data item that provides the text content of the list items. Based on this field, the widget filters the data source.
public string DataTextField { get; set; }
The field of the data item that provides the value of the widget.
public string DataValueField { get; set; }
public ListBoxDraggableSettings Draggable { get; set; }
Array of id strings which determines the ListBoxes that can drag and drop their items to the current ListBox. The dropSources option describes a one way relationship. If you want a two-way connection, then set the dropSources option on both widgets.
public string[] DropSources { get; set; }
Defines the localization texts for the ListBox. Used primarily for localization.
public ListBoxMessagesSettings Messages { get; set; }
Indicates whether the keyboard navigation is enabled or disabled.
public bool? Navigatable { get; set; }
public ListBoxSelectable? Selectable { get; set; }
The handler for the Template
public string TemplateHandler { get; set; }
The id for the Template
public string TemplateId { get; set; }
Defines the settings for displaying the toolbar of the ListBox. The toolbar allows you to execute a set of predefined actions.By default, the toolbar is not displayed. If the tools array is populated, then the toolbar and the corresponding tools are displayed.
public ListBoxToolbarSettings Toolbar { get; set; }
public IUrlGenerator UrlGenerator { get; }
Methods
public override IDictionary<string, object> Serialize()
Overrides:
Writes the HTML.
protected override void WriteHtml(HtmlTextWriter writer)
Overrides:
Writes the initialization script.
public override void WriteInitializationScript(TextWriter writer)
The writer.
Overrides: