ListViewBuilder<T>
Defines the fluent API for configuring the Kendo UI ListView
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Type Parameters:
T
Syntax:
public class ListViewBuilder<T> : WidgetBuilderBase<ListView<T>, ListViewBuilder<T>>, IHtmlContent where T : class
Inheritance: objectHelperResultWidgetBuilderBase<ListView<T>, ListViewBuilder<T>>ListViewBuilder<T>
Implements:
Inherited Members
Constructors
Initializes a new instance of the ListViewBuilder<T> class.
Methods
Sets an aria-label attribute on the ListView content element (the element with role listbox or list).
public ListViewBuilder<T> AriaLabel(string value)
The value for AriaLabel
Returns:Returns the current ListViewBuilder<T> instance.
If set to false the widget will not bind to the data source during initialization. In this case data binding will occur when the change event of the data source is fired. By default the widget will bind to the data source specified in the configuration.
public ListViewBuilder<T> AutoBind(bool value)
The value for AutoBind
Returns:Returns the current ListViewBuilder<T> instance.
Binds the ListView to a list of objects
public ListViewBuilder<T> BindTo(IEnumerable dataSource)
The data source.
Returns:Returns the current ListViewBuilder<T> instance.
Binds the ListView to a list of objects
public ListViewBuilder<T> BindTo(IEnumerable<T> dataSource)
The IEnumerable list of objects.
Returns:Returns the current ListViewBuilder<T> instance.
Renders border around the listview element.
public ListViewBuilder<T> Bordered(bool value)
The value for Bordered
Returns:Returns the current ListViewBuilder<T> instance.
Renders border around the listview items. Valid values are: all: renders borders around listview items.; horizontal: renders top border of listview items. Useful when setting layout: "flex" and flex.direction: column. or vertical: renders top border of listview items. Useful when setting layout: "flex" and flex.direction: row..
public ListViewBuilder<T> Borders(string value)
The value for Borders
Returns:Returns the current ListViewBuilder<T> instance.
Specifies ListView alternating item template.
public ListViewBuilder<T> ClientAltTemplate<TModel>(TemplateBuilder<TModel> template)
The template component which contains the template.
Returns:Returns the current ListViewBuilder<T> instance.
Specifies ListView alternating item template.
public ListViewBuilder<T> ClientAltTemplateHandler(string templateHandler)
The view which contains the template.
Returns:Returns the current ListViewBuilder<T> instance.
Specifies ListView alternating item template.
public ListViewBuilder<T> ClientAltTemplateId(string templateId)
The Id of the script element which contains the template.
Returns:Returns the current ListViewBuilder<T> instance.
Specifies ListView alternating item template.
public ListViewBuilder<T> ClientAltTemplateView(IHtmlContent templateView)
The view which contains the template.
Returns:Returns the current ListViewBuilder<T> instance.
Specifies ListView item template.
public ListViewBuilder<T> ClientTemplate<TModel>(TemplateBuilder<TModel> template)
The template component which contains the template.
Returns:Returns the current ListViewBuilder<T> instance.
Specifies ListView item template.
public ListViewBuilder<T> ClientTemplateHandler(string templateHandler)
The function handler which contains the template.
Returns:Returns the current ListViewBuilder<T> instance.
Specifies ListView item template.
public ListViewBuilder<T> ClientTemplateId(string templateId)
The Id of the script element which contains the template.
Returns:Returns the current ListViewBuilder<T> instance.
Specifies ListView item template.
public ListViewBuilder<T> ClientTemplateView(IHtmlContent templateView)
The view which contains the template.
Returns:Returns the current ListViewBuilder<T> instance.
Defines the type of element that holds the listview content.
public ListViewBuilder<T> ContentElement(string value)
The value for ContentElement
Returns:Returns the current ListViewBuilder<T> instance.
Binds the ListView to a DataSource.
public ListViewBuilder<T> DataSource(Action<DataSourceBuilder<T>> configurator)
The DataSourceBuilder<TModel> configurator.
Returns:Returns the current ListViewBuilder<T> instance.
Binds the ListView to an existing DataSource instance.
public ListViewBuilder<T> DataSource(string dataSourceId)
The name of the client DataSource instance.
Returns:Enables ListView editing.
Configures the ListView editing settings.
public ListViewBuilder<T> Editable(Action<ListViewEditingSettingsBuilder<T>> configurator)
The editing settings configurator.
Returns:Returns the current ListViewBuilder<T> instance.
Configures the client-side events.
public ListViewBuilder<T> Events(Action<ListViewEventBuilder> configurator)
The client events action.
Returns:Returns the current ListViewBuilder<T> instance.
Flex layout settings
public ListViewBuilder<T> Flex(Action<ListViewFlexSettingsBuilder<T>> configurator)
The ListViewFlexSettingsBuilder<T> for the flex setting.
Returns:Returns the current instance of ListViewBuilder<T> .
Grid layout settings.
public ListViewBuilder<T> Grid(Action<ListViewGridSettingsBuilder<T>> configurator)
The ListViewGridSettingsBuilder<T> for the grid setting.
Returns:Returns the current instance of ListViewBuilder<T> .
Specify the layout of listview content. Valid options are: flex: This is equivalent to display: flex. It defines a flex container and enables a flex context for all its direct children. Think of flex items as primarily laying out either in horizontal rows or vertical columns. or grid: This is equivalent to display: grid. It defines the element as a grid container and establishes a new grid formatting context for its contents..
public ListViewBuilder<T> Layout(string value)
The value for Layout
Returns:Returns the current ListViewBuilder<T> instance.
Indicates whether keyboard navigation is enabled/disabled.
public ListViewBuilder<T> Navigatable()
Returns the current ListViewBuilder<T> instance.
Indicates whether keyboard navigation is enabled/disabled.
public ListViewBuilder<T> Navigatable(bool value)
The value for Navigatable
Returns:Returns the current ListViewBuilder<T> instance.
Allows paging of the data.
Allows paging of the data.
public ListViewBuilder<T> Pageable(Action<ListViewPageableBuilder> pagerAction)
Use builder to define paging settings.
Returns:Returns the current ListViewBuilder<T> instance.
If set, the ListView will display a scrollbar when the content exceeds the ListView's height. By default, scrolling is disabled.
In endless scrolling mode the listview should be configured to display a scrollbar. Scrolling to the end of the scrollbar will load more items (equal to the pageSize number) and append them to the listview DOM element utill all items are loaded and displayed.
public ListViewBuilder<T> Scrollable(ListViewScrollableMode mode)
The value for Scrollable
Returns:Returns the current ListViewBuilder<T> instance.
Enables single item selection.
Specifies whether item selection is allowed. By default selection is disabled
public ListViewBuilder<T> Selectable(Action<ListViewSelectableSettingsBuilder<T>> configurator)
The ListViewSelectableSettingsBuilder<T> for the selectable setting.
Returns:Returns the current instance of ListViewBuilder<T> .
Specifies whether item selection is allowed. By default selection is disabled
public ListViewBuilder<T> Selectable(bool enabled)
Enables or disables the selectable option.
Returns:Returns the current instance of ListViewSelectableSettingsBuilder<T> .
Enables selection in the specified selection mode.
public ListViewBuilder<T> Selectable(ListViewSelectionMode mode)
The selection mode.
Returns:Returns the current ListViewBuilder<T> instance.
Specifies ListView wrapper element tag name.
public ListViewBuilder<T> TagName(string value)
The value for TagName
Returns:Returns the current ListViewBuilder<T> instance.