New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Kendo UI ListView component

Definition

Constructors

Initializes a new instance of the ListView<T> class.

C#
public ListView(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
Parameters:viewContextViewContext

The context for view execution.

initializerIJavaScriptInitializer

The JavaScript initializer.

urlGeneratorIUrlGenerator

The url generator.

Properties

Sets an aria-label attribute on the ListView content element (the element with role listbox or list).

C#
public string AriaLabel { get; set; }

Defines whether the ListView will bind to the data source during initialization.

C#
public bool? AutoBind { get; set; }

Renders border around the listview element.

C#
public bool? Bordered { get; set; }

Implements: IListView.Bordered

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..

C#
public string Borders { get; set; }

Implements: IListView.Borders

Gets or sets the client template used to render ListView items.

C#
public string ClientAltTemplate { get; set; }
C#
public string ClientAltTemplateHandler { get; set; }

Gets or sets the id of the client template used to render ListView items.

C#
public string ClientAltTemplateId { get; set; }

Implements: IListView.ClientAltTemplateId

Gets or sets the client template used to render ListView items.

C#
public string ClientTemplate { get; set; }
C#
public string ClientTemplateHandler { get; set; }

Gets or sets the id of the client template used to render ListView items.

C#
public string ClientTemplateId { get; set; }

Implements: IListView.ClientTemplateId

Defines the type of element that holds the listview content.

C#
public string ContentElement { get; set; }

Gets the DataSource settings.

C#
public DataSource DataSource { get; }

Implements: IListView.DataSource

Gets or sets the name of the external DataSource used by the ListView.

C#
public string DataSourceId { get; set; }

Gets the ListView editing settings.

C#
public ListViewEditingSettings<T> Editable { get; }

Gets or sets the ListView editor HTML.

C#
public string EditorHtml { get; set; }

Implements: IListView.EditorHtml

Flex layout settings

C#
public ListViewFlexSettings Flex { get; }

Implements: IListView.Flex

Grid layout settings.

C#
public ListViewGridSettings Grid { get; }

Implements: IListView.Grid

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..

C#
public string Layout { get; set; }

Implements: IListView.Layout

Gets or sets the ListView keyboard navigation settings.

C#
public bool Navigatable { get; set; }

Implements: IListView.Navigatable

Gets the ListView paging settings.

C#
public ListViewPageableSettings Pageable { get; }

Implements: IListView.Pageable

If set to true the listview will display a scrollbar when the content exceeds the listview height value. By default scrolling is disabled. It could be set to endless in order to enable the endless scrolling functionality. 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.

C#
public ListViewScrollableSettings Scrollable { get; }

Specifies whether item selection is allowed. By default selection is disabled

C#
public ListViewSelectionSettings Selectable { get; }

Implements: IListView.Selectable

Specifies ListView wrapper element tag name.

C#
public string TagName { get; set; }

Implements: IListView.TagName

Gets the UrlGenerator instance.

C#
public IUrlGenerator UrlGenerator { get; }

Implements: IListView.UrlGenerator

Methods

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: WidgetBase.Serialize()

Verifies if all required settings are present in the ListView.

C#
public override void VerifySettings()

Overrides: WidgetBase.VerifySettings()

Writes the ListView HTML output.

C#
protected override void WriteHtml(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

The text writer instance.

Overrides: WidgetBase.WriteHtml(HtmlTextWriter)

Writes the ListView initialization script.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

The text writer instance.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)