Reference Source
public class | source

ListView

Represents a ui ListView

See:

Constructor Summary

Public Constructor
public

constructor(id: String, options: Object)

Constructor

Method Summary

Public Methods
public

dataItem(row: String | Element | jQuery): Object

Returns the specified data item.

public

Returns the array that is bound to the widget.

public

select(items: jQuery | Array): jQuery

Gets the selected ListView item.

public

selectFirstItem(): Null

Selects first list view item.

public

setDataSource(array: String[]): Null

Sets the dataSource of an existing ListView and rebinds it.

Public Constructors

public constructor(id: String, options: Object) source

Constructor

Params:

NameTypeAttributeDescription
id String

ListView id.

options Object

config params.

options.selectable Boolean | String

Indicates whether selection is enabled/disabled.

options.dataSource Object | Array

The data source of the widget is used render ListView rows.

options.template String

Specifies ListView item template.

options.change function(e: Object): null

callback function will run on selection change event.

options.dataBound function(e: Object): null

callback function will run on the list view has received data from the data source and it is already rendered.

Public Methods

public dataItem(row: String | Element | jQuery): Object source

Returns the specified data item.

Params:

NameTypeAttributeDescription
row String | Element | jQuery

the row to get data.

Return:

Object

The data item to which the specified listview item is bound.

public dataItems(): Array source

Returns the array that is bound to the widget.

Return:

Array

The array that is bound to the widget.

public select(items: jQuery | Array): jQuery source

Gets the selected ListView item.

Params:

NameTypeAttributeDescription
items jQuery | Array

the items to select.

Return:

jQuery

the selected items if called without arguments.

public selectFirstItem(): Null source

Selects first list view item.

Return:

Null

public setDataSource(array: String[]): Null source

Sets the dataSource of an existing ListView and rebinds it.

Params:

NameTypeAttributeDescription
array String[]

the ListView's values will be set with this

Return:

Null